PS2

  1. 1

    Restaurant Management System, logical ERD. Define at least 4 entities, each with at least 4 attributes (with appropriate data types and constraints). Establish one 1:M, one 1:1 and one M:N relationship.

    Use a professional tool (e.g. draw.io, Lucidchart) to draw a Logical ERD with proper use of data types, primary keys and foreign keys.

  2. 2

    Use MySQL to implement the logical ERD. Your tables must include:

    • proper data types (VARCHAR, INTEGER, DATE, etc.)
    • primary keys and foreign keys
    • constraints (NOT NULL, UNIQUE, etc.)
    • clear and consistent naming conventions for tables, columns and constraints
    • explicit names for all foreign key constraints and indexes (e.g. fk_order_Customer, fk_orderitem_menuitem)
  3. 3

    Deliverable. Submit a single PDF containing your logical ERD and a screenshot of the EERD from Workbench, and a single .sql file containing CREATE TABLE statements for all tables. The code should be well formatted and commented if needed.

    Tip: in Workbench you can go Model to Database (forward engineering: draw the EER diagram first, then generate the SQL) or Database to Model (reverse engineering: write the CREATE TABLE statements first, then generate the EER diagram).