== Relational Mapping - Partial Transformation === Notations * Primary keys are marked with **__bold and underlined letters__** \\ * Foreign keys are marked with * === Relational Schema 1. User(**__id__**, email, street, city, phone_number, password) 2. Employee(**__user_id__***, net_salary, gross_salary) 3. Customer(**__user_id__***) 4. Manager(**__user_id__***) 5. FrontStaff(**__employee_id__***, tip_percent, staff_role_id*) 6. BackStaff(**__employee_id__***, staff_role_id*) 7. StaffRole(**__staff_role_id__**, name) 8. Shift(**__shift_id__**, date, start, end, manager_id*) 9. Assignment(**__id__**, clock_in_time, clock_out_time, manager_id*, employee_id*, shift_id*) 10. Reservation(**__id__**, stay_length, datetime, creation_timestamp, number_of_people, user_id*) 11. Reservation_managed_FrontStaff(**__reservation_id__***, **__employee_id__***, **__table_number__***) 12. Category(**__id__**, name, is_available) 13. Product(**__id__**, name, price, tax_class, description, manage_inventory, category_id*) 14. Inventory(**__product_id__***, quantity, restock_level) 15. OrderItem(**__id__**, quantity, price, is_processed, timestamp, product_id*, order_id*) 16. Order(**__id__**, timestamp, status) 17. TabOrder(**__order_id__***, table_number*, frontstaff_id*) 18. OnlineOrder(**__order_id__***, **__customer_id__***, delivery_adress) 19. Table(**__table_number__**, seat_capacity) 20. Payment(**__id__**, tip_amount, timestamp, payment_type, amount, order_id*) == DDL Script for Dropping and Creating Tables [attachment:​ddl (1).sql​] == DML Script for Populating Tables with Data [attachment:dml.sql​​] == Tables [[Image(schema1.png)]]