COMP3311 Final Exam 21T3 |
The University of New South Wales COMP3311 Database Systems Final Exam 21T3 |
Database Systems |
The following ER diagram describes an online recipe database scenario.
Convert the ER diagram into a relational schema expressed as a collection of PostgreSQL CREATE TABLE statements. Your schema must show all primary key constraints and foreign key constraints. You may add any new attributes that you need to represent all aspects of the ER diagram; assign them types and constraints as appropriate. The precise name of a new attribute is not important, as long as it is different from existing attributes. If there are any semantic aspects suggested by the diagram and comments below which cannot be represented in the relational schema using standard SQL constraints, document these.
The following gives more details on the precise semantics of the scenario:
Exercise: Write an SQL schema that accurately represents the above ER design.
Instructions: