The Circle of Crust pizza shoppe is known throughout the town for their delicious, artisanal pizzas. Until now, they have eschewed computers and managed to keep track of orders via pencil and paper, but due to high (largely hipster) demand for their surprisingly expensive pizza, they now need a software system to manager orders.
You are tasked with designing a database to support a pizza order management application. As the shoppe grows more popular the database design will grow in complexity.
You will use https://dbdiagram.io/ to create an ERD that represents your database design.
The system needs a table to keep track of pizza orders. Customers may only order one pizza at a time and each pizza may have a single topping.
An order consists of the following information:
- Customer Name
- Price
- Order Date
- Topping Name
- Crust Type
A Crust Type may only be one of the following:
- Thin Crust
- Hand Tossed
- Deep Dish
The Circle of Crust is getting a lot of repeat business, so they have decided that it would make sense start keeping track of customers separately from pizza orders. Update your ERD with a table that will contain customer information.
A Customer record should contain the following information:
- First Name
- Last Name
- Address
- A flag that indicates if the customer is a hipster or not
NOTE: Remember that you'll need to update the Order table to refer to the new Customer table.
Due to the popularity of their high-quality toppings, The Circle of Crust shoppe has decided to allow unlimited toppings per pizza. Update your ERD to allow one pizza to be ordered with many toppings and for one topping to be added to many pizzas.
Each topping should have a Name.
The folks at the shoppe are pizza artists and are not as technical as you. They have a hard time visualizing what a database that adheres to the ERD will look like. Create an example database.json
file that matches the ERD you've created.