Please watch the following video, and complete the exercise below:
→ Download video
Quick Exercise
To check your understanding
- The following database holds information about orders in a grocery shop.
- Unfortunately, it was created without a proper design process and only consists of one table named "shop":
ID | customer_name | email | product_name | product_price | related_product | quantity | order_date |
1 | John Doe | Milk | 1.5 | Cocoa | 2 | 2023-06-01 | |
2 | Jane Doe | Pancake Mix | 3 | Maple Syrup | 5 | 2023-06-02 | |
3 | John Doe | Maple Syrup | 7 | Pancake Mix | 3 | 2023-06-03 |
- Follow the steps:
- Create an ER Diagram: Using a paper, jot down a simple diagram of the entities that exist here. You can write the relationships between them in your own words. It doesn’t have to look like a professional diagram, just write it your own way.
- Create a list of tables.
- Write columns for each table: If a column serves as a primary or foreign key, note it next to it’s name.
‣
‣