I’m trying to design a simple pizza order system. Starting with a database, I’d like it to be rather dynamic.
The customer, delivery, ordered etc is all pretty simple to me, but I’m running into problems figuring out how to do some of the more complex pizza types.
I have the following tables:
Code:
Table Name: Columns: Description
Menu: PizzaID
Pizza Name Cheese, 1 Top, 2 Top, 3 Top, Veggie Lover, Deluxe, Meat Lover etc
Pizza Descripton
Pizza Price
Ingredients: IngID
IngName Pepperoni, Sausage, Ham, Motz, Cheddar, Onions, Olives, Thin, Thick
IngCatID ID From a row on IngCategories Table
IngCategories: CatID
CatName
I though I’d use a Menu_Ingredients join table to do a many to many to connect the menu to the ingredients. It seems simple at first, but it starts to break down when I try to conceptualize a 2 meat or 3 meat pizza. For example, a Meat Lover may automatically contain 3 specific meats, but the 3 Top is a choice of 3, so it seems there needs to be some intermediary step between the Menu_Ingredients table and the Menu Table. Something that says how many ingredients does this pizza get? But then what about other parts that are always 1 to 1? Every pizza has 1 crust and 1 sauce. It seems I may be in over my head on this one. Any help would be appreciated.