Project 4 – Pizza Takeaway From Scratch
Project in Progress
This project aims to take a business need and develop ia solution from first principals to a working model.
Need: A new business owner is starting a pizza takeaway business and needs a way to track orders, stock levels and staff.
Phase 1: Create a relational database to capture all the relevant information.
Phase 2: Create queries to surface information that the business owner needs
Phase 3: Create a dashboard to display all the information
Identify the data that needs to be captured:
– order #
– time of order
– product name
– product price
– product size
– product category (eg pizza, sides)
– customer name
– customer address
And as an order will go to one customer at one address there will be duplicate customer and address entries. To normalise the table the customer and address data should be moved to seperate tables.
The customer name could be a single row but for this project I will be using first and last name.
The address should also be seperated to enable simpler future queries. The address table will therefore have address, city and postcode rows.
In the order table an order can have many products so we need to add an additional row for the primary key to uniquely identify each order and product.
– row_id (pk)
On reflection, to track the stock levels we need to know what products have been purchased. A new table for products will be needed.
So far the tables created are orders, customers, address and product.
This project is a work in progress and will be updated shortly.