This SQL project revolves around a database schema designed to manage and analyze data for a pizza store. The database consists of four primary tables:
orders
order_details
pizzas
pizza_type
Each table plays a crucial role in storing different facets of the business operations, from individual orders to the types of pizzas offered. Below is a detailed description of each table and its columns:
-
order_details: — order_details_id: A unique identifier for each entry in the order details. — order_id: References the ID from the orders table, linking the order detail to a specific order. — pizza_id: References the ID from the pizzas table, identifying which pizza was ordered. — quantity: The number of pizzas ordered of the specified type.
-
pizzas: — pizza_id: A unique identifier for each type of pizza available. — pizza_type_id: Links to the pizza_types table, specifying the type of pizza. — size: The size of the pizza (e.g., small, medium, large). — price: The cost of the pizza.
-
orders: — order_id: A unique identifier for each order placed. — date: The date on which the order was placed. — time: The time at which the order was placed.
-
pizza_types: — pizza_type_id: A unique identifier for each type of pizza. — name: The name of the pizza type (e.g., Margherita, Pepperoni). — category: Categorizes the pizza (e.g., Vegetarian, Non-Vegetarian). — ingredients: Lists the ingredients used in the pizza.