The section below is to showcase Ryan ability to create an ERD Diagram for a cafe to process their order or make a reservation. He has also written some SQL script to generate the data.
Assumptions made when creating the ERD Diagram:
User and Events
User has to register through their email address and their email address is there username. One user can have many orders and make many reservations. Nevertheless, one user can attend many events while one event can have many users.
One Event can only has one cost charged to the customers while one type of cost that charged to the customer can be applied to many different types of event.
Order and Payment
One order can have many types of payment. However, this dataset has only credit card payment. And one payment can has only one type of payment status (“Payment” or “Refund”) while one payment status can have many payments (transactions).
On the other hand, one order can only has one status (“Pending”, “Rejected”, “Prepared” and “Delivered”) but one order status can has many orders.
Reservation and Outlet
One reservation can only be registered by one member (User) while one user can reserve many reservations on different date, time and outlet. Nevertheless, one outlet can has many reservations but one reservation is only catered to one outlet. And one outlet has only one maximum capacity while one maximum capacity can be applied to many outlets.
Menu Items
One menu item has many sizes while one size can be applied to many menu items. One menu item can be sold to many orders while one order can have many menu items. One menu item can be sold to many outlets while one outlet can sell many different types of menu item. The same type of menu item can be sold and delivered many times while one delivery can have many menu items that are the same.