A project is proposed to design a database for shops selling dairy products. Each shop has a
Question:
A project is proposed to design a database for shops selling dairy products. Each shop has a unique ID, name, address and owner. Different shops could be owned by the same owner. Each shop sells several dairy products and has a price for each product. The same product could be sold at different shops, and the price could vary from one shop to another. For each product, the name and expiry date must be recorded. Each product is supplied by a farm, and the product name identifies a product uniquely within the farm. Each farm is identified by its unique name. In addition, some shops may have several contracts with different farms. For each contract, the start and end dates of the contract are documented, where the end date can be always extended during the lifetime of the contract. It is important to keep the number of running contracts for each farm and each shop.
Design an ER diagram for the above scenario, showing all attributes, keys, cardinalities, and participation constraints clearly. Note any unspecified requirements, and make appropriate assumptions to make the specification complete. Do not add any attributes of your own.
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi