Version 3 (modified by 10 days ago) ( diff ) | ,
---|
Relational Mapping - Partial Transformation
Notations
- Primary keys are marked with bold and underlined letters
- Foreign keys are marked with *
Relational Schema
- User(id, email, street, city, phone_number, password)
- Employee(user_id*, net_salary, gross_salary)
- Customer(user_id*)
- Manager(user_id*)
- FrontStaff(employee_id*, tip_percent, staff_role_id*)
- BackStaff(employee_id*, staff_role_id*)
- StaffRole(staff_role_id, name)
- Shift(shift_id, date, start, end, manager_id*)
- Assignment(id, clock_in_time, clock_out_time, manager_id*, employee_id*, shift_id*)
- Reservation(id, stay_length, datetime, creation_timestamp, number_of_people, user_id*)
- Reservation_managed_FrontStaff(reservation_id*, employee_id*, table_number*)
- Category(id, name, is_available)
- Product(id, name, price, tax_class, description, manage_inventory, category_id*)
- Inventory(product_id*, quantity, restock_level)
- OrderItem(id, quantity, price, is_processed, timestamp, product_id*, order_id*)
- Order(id, timestamp, status)
- TabOrder(order_id*, table_number*, frontstaff_id*)
- OnlineOrder(order_id*, customer_id*, delivery_adress)
- Table(table_number, seat_capacity)
- Payment(id, tip_amount, timestamp, payment_type, amount, order_id*)
DDL Script for Dropping and Creating Tables
DML Script for Populating Tables with Data
Tables
Attachments (4)
- schema1.png (100.1 KB ) - added by 10 days ago.
- dml (1).sql (2.5 KB ) - added by 10 days ago.
- ddl (1).sql (6.4 KB ) - added by 10 days ago.
- dml.sql (2.5 KB ) - added by 10 days ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.