The Logical Data Model of the MENU Subject Area includes three groups of entities:
This entity records information about all the Menus available at a Store. One Store can have many Menus available.
Attributes | |
---|---|
ID | PRIMARY KEY |
Store_ID | Lookup for the Store for which the Menu was recorded. NOT NULL |
Name | Menu name. NOT NULL UNIQUE. Can't have two Menus with the same Name at a Store. |
Description | Menu description. |
Is_Active | Flag attribute to indicate if the Menu is still available at the Store or it was canceled permanently. NOT NULL |
Comments | Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees |
Example
MENU
Name |
---|
Breakfast |
Lunch |
Dinner |
etc. |
List of food categories
Attributes | |
---|---|
ID | PRIMARY KEY |
Name | Name of food category. NOT NULL UNIQUE. Can't have two food categories with the same Name. |
Description | Description of food category. |
Is_Active | Flag attribute to indicate if the food category is still available or it was canceled permanently. NOT NULL |
Comments | Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees |
Example
CATEGORY
Name |
---|
Pasta |
Pizza |
Salads |
Sandwiches |
Desserts |
Drinks |
etc. |
This entity records all the food Categories assigned to a Menu. Each Menu can have many food Categories assigned.
Attributes | |
---|---|
ID | PRIMARY KEY |
Menu_ID | Lookup for the Menu to which the food Category is assigned. NOT NULL |
Category_ID | Lookup for the food Category to be assigned to the Menu. NOT NULL |
Description | Description. |
CONSTRAINT UK_Menu_Category UNIQUE (Menu_ID, Category_ID). Cannot have the same food Category assigned twice to the same Menu.
Example
MENU_CATEGORY table contains the Menu_ID and the Category_ID for all the food Categories assigned to a Menu.
Each Menu can have many food Categories assigned:
Menu_ID | Name | Category_ID | Name |
---|---|---|---|
2 | Breakfast | 23 | Sandwiches |
2 | Breakfast | 27 | Desserts |
3 | Lunch | 7 | Pizza |
3 | Lunch | 28 | Salads |
3 | Lunch | 27 | Desserts |
Important The above values for the Menu_ID and the Category_ID are just samples. When populate the MENU_CATEGORY table with values, you should use the Menu_ID and the Category_ID values from your database.
List of all food items.
Attributes | |
---|---|
ID | PRIMARY KEY |
Name | Name of food item. NOT NULL UNIQUE. Can't have two food items with the same Name. |
Description | Description of food item. This description can be displayed near the item Name when Customers select the item for an Order. |
Calories | Number of calories of the food item. |
Ingredients | Description of the ingredients of the food item. |
Recipe | Description of the recipe of the food item. |
In_Stock | Flag attribute to indicate if the food item is still available in stock. NOT NULL |
Comments | Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees |
Example
ITEM
Name |
---|
Penne Carbonara |
Spaghetti |
Apple Cake |
Ice cream |
Espresso |
etc. |
Example
How to use In_Stock flag in your application
When In_Stock flag is set FALSE for an Item then:
This entity records all the food Items assigned to a food Category. Each Category can have many food Items assigned.
Note
Each food Item should be assigned to at least one food Category. Otherwise the food Item is not visible when Customer browses the food Categories to select the food Items for an Order.
Attributes | |
---|---|
ID | PRIMARY KEY |
Category_ID | Lookup for the food Category to which the food Item is assigned. NOT NULL |
Item_ID | Lookup for the food Item to be assigned to the food Category. NOT NULL |
Description | Description. |
CONSTRAINT UK_Category_Item UNIQUE (Category_ID, Item_ID). Cannot have the same food Item assigned twice to the same food Category.
Example
CATEGORY_ITEM table contains the Category_ID and the Item_ID for all the food Items assigned to a food Category.
Each food Category can have many food Items assigned:
Category_ID | Name | Item_ID | Name |
---|---|---|---|
2 | Pasta | 28 | Penne carbonara |
2 | Pasta | 142 | Spaghetti |
3 | Desserts | 23 | Apple Cake |
3 | Desserts | 27 | Ice cream |
4 | Drinks | 7 | Espresso |
Important The above values for the Category_ID and the Item_ID are just samples. When populate the CATEGORY_ITEM table with values, you should use the Category_ID and the Item_ID values from your database.
List of diet types.
Attributes | |
---|---|
ID | PRIMARY KEY |
Name | Diet type name. NOT NULL UNIQUE. Can't have two diet types with the same Name. |
Description | Description of the diet type. |
Is_Active | Flag attribute to indicate if the diet type is still available for customers or it was canceled permanently. NOT NULL |
Example
DIET_TYPE
Name |
---|
Vegetarian |
Sugar free |
etc. |
This entity records all the food Items that are assigned to a Diet Type. Each Diet Type can have many food Items assigned.
Attributes | |
---|---|
ID | PRIMARY KEY |
Diet_Type_ID | Lookup for the Diet Type to which the food Item is assigned. NOT NULL |
Item_ID | Lookup for the food Item to be assigned to a Diet Type. NOT NULL |
Description | Description. |
CONSTRAINT UK_Diet_Item UNIQUE (Diet_Type_ID, Item_ID). Cannot have the same food Item assigned twice to the same Diet Type.
Example
DIET_ITEM table contains the Diet_Type_ID and the Item_ID for all the food Items assigned to a Diet Type.
Each Diet Type can have many food Items assigned:
Diet_Type_ID | Name | Item_ID | Name |
---|---|---|---|
2 | Vegetarian | 23 | Tomatoes salad |
2 | Vegetarian | 27 | Roasted potatoes |
3 | Sugar-free | 7 | Espresso |
Important The above values for the Diet_Type_ID and the Item_ID are just samples. When populate the DIET_ITEM table with values, you should use the Diet_Type_ID and the Item_ID values from your database.
Day hours list. This entity facilitates Store and Menu hours selection and display.
Attributes | |
---|---|
ID | PRIMARY KEY |
Name | Hour name NOT NULL |
AM_PM | Ante Meridian or Post Meridian hour. This attribute can have 'AM' or 'PM' value. NOT NULL |
Description | Hour description |
CONSTRAINT Hour_UK UNIQUE (Name, AM_PM)).
Example
HOUR
Name | AM_PM | |
---|---|---|
9 | AM | |
9 | PM | |
3 | AM | |
7 | PM etc. |
Week days list. This entity facilitates week days selection and display.
Attributes | |
---|---|
ID | PRIMARY KEY |
Name | Week day name NOT NULL UNIQUE |
Description | Week day description |
Example
WEEK_DAY
Name | Description |
---|---|
Monday | 1 - First day of the week |
Tuesday | 2 - Second day of the week |
Wednesday | 3 - Third day of the week |
etc |
This entity records information if the restaurant Store can sell some food Items only on specific days of the week (for example only during weekends) and only for a limited time interval (for example from 2 PM to 4 PM).
Note
The Item hours override the Menu hours. See Entity: MENU_HOURS for more information.
Attributes | |
---|---|
ID | PRIMARY KEY |
Item_ID | Item lookup. The food item for which the Item hours are recorded. NOT NULL |
Week_Day_ID | Week day lookup. The day of the week when the food item can be ordered. NOT NULL |
Start_Hour_ID | Start hour lookup. The start hour from which the food item can be ordered. NOT NULL |
End_Hour_ID | End hour lookup. The end hour after which the item can not be ordered. NOT NULL |
Comments | Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees. |
Example
ITEM_HOUR
Item ID | Name | Week Day ID | Name | Start Hour ID | Name | End Hour ID | Name |
---|---|---|---|---|---|---|---|
87 | Tuna steak | 6 | Saturday | 9 | 1 PM | 14 | 5 PM |
87 | Tuna steak | 7 | Sunday | 9 | 1 PM | 14 | 5 PM |
35 | Fresh seafood | 1 | Monday | 13 | 8 AM | 25 | 8 PM |
If you don't need to control the Item hours just let this table empty. |
Important The above values for the Item_ID, Week_Day_ID, Start_Hour_ID, End_Hour_ID are just samples. When populate the ITEM_HOUR table with values, you should use the Item_ID, Week_Day_ID, Start_Hour_ID, End_Hour_ID values from your database.
This entity records information about the Menus available only on specific days of the week (for example only during weekends) and only for a limited time interval (for example from 2 PM to 4 PM).
Note
The Store Holiday hours override the Menu hours. See Subject Area: STORE, Entity: HOLIDAY for more information.
Attributes | |
---|---|
ID | PRIMARY KEY |
Menu_ID | Menu lookup. The Menu for which the Menu hours are recorded. NOT NULL |
Week_Day_ID | Week day lookup. The week day when the Menu is available for a limited time interval. NOT NULL |
Start_Hour_ID | Menu start hour lookup. NOT NULL |
End_Hour_ID | Menu end hour lookup. NOT NULL |
Comments | Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees. |
Example
MENU_HOUR
Menu ID | Name | Week Day ID | Name | Start Hour ID | Name | End Hour ID | Name |
---|---|---|---|---|---|---|---|
7 | Brunch | 6 | Saturday | 9 | 8 AM | 14 | 4 PM |
7 | Brunch | 7 | Sunday | 10 | 9 AM | 24 | 5 PM |
3 | Lunch | 1 | Monday | 13 | 12 AM | 14 | 4 PM |
If you don't need to control the Menu hours just let this table empty. |
Important The above values for the Menu_ID, Week_Day_ID, Start_Hour_ID, End_Hour_ID are just samples. When populate the MENU_HOUR table with values, you should use the Menu_ID, Week_Day_ID, Start_Hour_ID, End_Hour_ID values from your database.
List of customizations that can be applied to a food item: 'Topping', 'Portion size' etc. The Customer has the possibility to choose from the pre-defined customizations.
Attributes | |
---|---|
ID | PRIMARY KEY |
Name | Customization name. Can't have two Customizations with the same Name. NOT NULL UNIQUE |
Display_Title | Display title for Customer. Can't have two Customizations with the same Display title. NOT NULL UNIQUE |
Description | Customization description. |
Is_Active | Flag attribute to indicate if the Customization is still available or the Customization was canceled permanently and the Customers can not select it anymore. NOT NULL |
Example
CUSTOMIZATION
Name | Display_Title |
---|---|
Topping | Please choose the topping |
Portion size | Please choose the portion size |
etc |
This entity records all the Customization Options assigned to a Customization.
Attributes | |
---|---|
ID | PRIMARY KEY |
Customization_ID | Lookup for the Customization to which the Customization Option is assigned. NOT NULL |
Name | Name of the customization option. NOT NULL UNIQUE. Can't have two customization options with the same Name. |
Description | Description of customization option. |
Is_Active | Flag attribute to indicate if the customization option is still available for customizations or it was canceled permanently. NOT NULL |
Example
CUSTOMIZATION_OPTION
Customization ID | Name | Customization Option ID | Name |
---|---|---|---|
2 | Topping | 23 | Chocolate |
2 | Topping | 27 | Strawberry |
2 | Topping | 42 | Vanilla |
3 | Portion size | 7 | Small |
3 | Portion size | 8 | Medium |
3 | Portion size | 9 | Large |
This entity records all the Customizations available for a food Item. Each food Item can have 0, 1 or many Customizations available.
Attributes | |
---|---|
ID | PRIMARY KEY |
Item_ID | Lookup for the food Item to which the Customization is assigned. NOT NULL |
Customization_ID | Lookup for the Customization to be assigned to the food Item. NOT NULL |
Comments | Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees. |
CONSTRAINT UK_Item_Customization UNIQUE (Item_ID, Customization_ID). Cannot have the same Customization assigned twice to the same food Item.
Example
ITEM_CUSTOMIZATION table contains the Item_ID and the Customization_ID for all the Customizations available for a food Item. Each food Item can have 0, 1 or many Customizations available:
Item ID | Name | Customization ID | Name |
---|---|---|---|
27 | Ice cream | 2 | Topping |
24 | Roasted potatoes | 3 | Portion size |
23 | Apple Cake | 2 | Topping |
23 | Apple Cake | 3 | Portion size |
Important The above values for the Item_ID and the Customization_ID are just samples. When populate the ITEM_CUSTOMIZATION table with values, you should use the Item_ID and the Customization_ID values from your database.
This entity records all the Customization Options available for an Item.
For example the food Item: 'Apple Cake' has the assigned Customization: 'Topping'. See Entity: ITEM_CUSTOMIZATION for more information.
If for the food Item: 'Apple Cake' you would want to restrict the Customization: 'Topping' only to the Customization Option: 'Vanilla', then you should enter a record in the ITEM_OPTION table as in the example below.
In this case all the other 'Topping' customization options ('Chocolate', 'Strawberry' etc.) are not available for selection when a Customer will add the 'Apple Cake' item to an Order.
Attributes | |
---|---|
ID | PRIMARY KEY |
Item_Customization_ID | Lookup for the record in the ITEM_CUSTOMIZATION table to which the Customization Option is assigned. NOT NULL |
Customization_Option_ID | Lookup for the Customization option to be assigned. NOT NULL |
In_Stock | Flag attribute to indicate if the Item Option is still available in stock. For example the In_Stock attribute can indicate if the Customization: 'Topping' with the Customization Option: 'Chocolate' is in stock for the Item: 'Ice-cream'. The In_Stock flag can control the decision to suspend a Customization Option for an Item and continue the Customization Option for other Items. NOT NULL |
Default_Quantity | This is an indication for Customer about the default quantity of the customization that is delivered with the Item. For example for the Customization: 'Topping', for the Customization Option: 'Chocolate' for the Item: 'Ice cream' you can set the Default_Quantity: 1. That means if Customer would want to add 'Chocolate' topping two times to the Item, then should pay separately for the quantity over the default quantity. See Subject Area: PRICE AND DISCOUNT for more information. NOT NULL |
Comments | Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees. |
UK_Item_Option UNIQUE (Item_Customization_ID, Customization_Option_ID). Cannot have the same Customization Option assigned twice to the same Item_Customization record.
Example
ITEM_CUSTOMIZATION
Item ID | Name | Customization ID | Name |
---|---|---|---|
27 | Ice cream | 2 | Topping |
24 | Roasted potatoes | 3 | Portion size |
23 | Apple Cake | 2 | Topping |
23 | Apple Cake | 3 | Portion size |
Example
CUSTOMIZATION_OPTION
Customization ID | Name | Customization Option ID | Name |
---|---|---|---|
2 | Topping | 23 | Chocolate |
2 | Topping | 27 | Strawberry |
2 | Topping | 42 | Vanilla |
3 | Portion size | 7 | Small |
3 | Portion size | 8 | Medium |
3 | Portion size | 9 | Large |
Example
ITEM_OPTION table records all the Customization Options available for a specific food Item.
In this case all the other 'Topping' customization options ('Chocolate', 'Strawberry' etc) are not available for selection when a Customer will add the 'Apple Cake' Item to an Order.
Item ID | Name | Customization ID | Name | Customization Option ID | Name |
---|---|---|---|---|---|
23 | Apple Cake | 2 | Topping | 42 | Vanilla |