In: Computer Science
A&Z is a fast food chain that operates in various branches in the US. A&Z sells their own burger, Potato fries and drinks. The fast food products are supplied by A&Z’s registered suppliers. All food is pre-packed, and A&Z owns the licenses for their pre-packed food which are also supplied to local supermarkets. At fast food branch, the pre-packed food is sold as meals. Customers place their orders online and is delivered by A&Z delivery service.
a) There are 6 branches in US and each branch is managed by a manager.
b) Each BRANCH is uniquely identified by branch id and location (city).
c) Each branch may or may not have kitchen helpers and delivery staff.
d) Each STAFF are uniquely identified by staff id, name, branch id.
e) There are total of 5 registered suppliers who may or may not supply to all branches and the supermarkets.
f) Each SUPPLIER is uniquely identified by supplier id, name, and their supplies.
g) There are total of 8 SUPERMARKET that carries A&Z pre-packed food and each supermarket is identified with unique Supermarket code, location, and contact person.
h) Some supermarkets may or may not offer it as a meal.
i) The pre-packed food MEAL sold at the fast food branches are Family meal, Super meal, Junior meal, Deluxe meal, Single meal, and Special meal. Each meal is uniquely identified by meal code and meal description.
j) Each ORDER record is uniquely identified by order id and branch id, as well as customer address, email, contact number and order details.
Given the above information, draw the crow’s foot ERD / EERD capturing the business requirements for A&Z. You are to identify all entities, it’s attributes, state clearly the FKs & PKs, as well as the relationships, connectivities, cardinalities and optionalities.
In the below image Branch,Staff,Supplier, Supermarket ,Meal and Order are the entities created .
Inside the entities attributes,PK(primary key),FK(foreign key) as well as relationships,conectivities and cardinalities have been mentioned.Such as:
There is an relationship of:
branch and staff entity : 0 or many
branch and suppiler: 0 or many
Supplier and supermarket: 0 or many
Supermarket and meal:0 or Many
Meal and Order: 0 or Many
also for forign key relation there is connectivity between Order and Branch.