Changes between Version 13 and Version 14 of Logical and Physical Design – Database Creation
- Timestamp:
- 08/28/25 20:10:56 (5 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Logical and Physical Design – Database Creation
v13 v14 4 4 === Notation 5 5 - 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. 8 8 \\ 9 9 === 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)) 11 11 \\ 12 12 \\ 13 ** RESTAURANT_OWNER**(**__user_id*__**(USER))13 **ADMINISTRATOR**(**__user_id*__**(APP_USER), authorized_from, authorized_to) 14 14 \\ 15 15 \\ 16 ** DELIVERY_MAN**(**__user_id*__**(USER))16 **RESTAURANT_OWNER**(**__user_id*__**(APP_USER)) 17 17 \\ 18 18 \\ 19 ** CUSTOMER**(**__user_id*__**(USER))19 **DELIVERY_MAN**(**__user_id*__**(APP_USER)) 20 20 \\ 21 21 \\ 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) 23 26 \\ 24 27 \\ … … 53 56 \\ 54 57 \\ 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) 56 59 \\ 57 60 \\ 58 61 **CATEGORY**(**__category_id__**, name, description) 62 \\ 63 \\ 64 **MENU_ITEM**(**__menu_id*__**(MENU), ***__item_id__**(ITEM)) 59 65 \\ 60 66 \\