Service for Sandwich Shop
Assumptions
Each customer must place at least one order, otherwise the details of the customer will
not be saved in the database.
Business Rules
Each customer can place one or more orders. Each order belongs to a customer only
Each order can have one or more products. Each product can be ordered zero or more
times. Hence, there is a many to many relationship between order and product. The many
to many relationship has been resolved by adding a new associative entity set OrderLine.
An Order can have one or more orderline records. Each product will have zero or more
orderline records.
ER Diagram
The ER diagram contains four entities, the relationships between the entities, the attributes of the
entities as per users’ requirements and the details of the primary and foreign keys.
1