Changes between Version 13 and Version 14 of Logical and Physical Design – Database Creation


Ignore:
Timestamp:
08/28/25 20:10:56 (5 days ago)
Author:
221531
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Logical and Physical Design – Database Creation

    v13 v14  
    44=== Notation
    55- Entities are denoted with capital letters and their attributes are defined (a1, a2, ..., an) where n is the number of attributes the entity has.
    6 - Primary keys are denoted with underscore and boldness.
    7 - Foreign keys are denoted with asterisk suffixing the attribute.
     6- Primary keys are written in bold and underline.
     7- Foreign keys are marked with asterisk after the attribute name.
    88\\
    99=== Relations - Relational Schema
    10 **USER**(**__user_id__**, first_name, last_name, email, password, phone)
     10**APP_USER**(**__user_id__**, first_name, last_name, email, password, phone, **__administrator_id*__**(ADMINNISTRATOR))
    1111\\
    1212\\
    13 **RESTAURANT_OWNER**(**__user_id*__**(USER))
     13**ADMINISTRATOR**(**__user_id*__**(APP_USER), authorized_from, authorized_to)
    1414\\
    1515\\
    16 **DELIVERY_MAN**(**__user_id*__**(USER))
     16**RESTAURANT_OWNER**(**__user_id*__**(APP_USER))
    1717\\
    1818\\
    19 **CUSTOMER**(**__user_id*__**(USER))
     19**DELIVERY_MAN**(**__user_id*__**(APP_USER))
    2020\\
    2121\\
    22 **ORDER**(**__order_id__**, **user_id***(USER), **__address_id*__**(ADDRESS),order_date, comment, status)
     22**CUSTOMER**(**__user_id*__**(APP_USER))
     23\\
     24\\
     25**ORDERS**(**__order_id__**, **address_id***(ADDRESS), **restaurant_id***(RESTAURANT), **deliveryman_id***(DELIVERY_MAN), **user_id***(CUSTOMER), **__address_id*__**(ADDRESS),order_date, comment, order_status, total_amount)
    2326\\
    2427\\
     
    5356\\
    5457\\
    55 **MENU**(**__menu_id__**, **__restaurant_id*__**(RESTAURANT), **__item_id*__**(ITEM), created_at, updated_at, name)
     58**MENU**(**__menu_id__**, **__restaurant_id*__**(RESTAURANT), created_at, updated_at, name)
    5659\\
    5760\\
    5861**CATEGORY**(**__category_id__**, name, description)
     62\\
     63\\
     64**MENU_ITEM**(**__menu_id*__**(MENU), ***__item_id__**(ITEM))
    5965\\
    6066\\