-
5
pages
-
English
-
Documents
Description
University of Stirling, Department of Computing Science and Mathematics CSC931 (31Q5) / ITNP31 (IT31) Database Principles and Applications Tutorial 1 Sample Solutions (Part 2) 10. The E-R diagram below represents one possible way of modelling the bakery situation. Other solutions are possible. In particular, you may disagree with the optionality that I have chosen for some of the relationships in the model. I’ve based my choices on the following assumptions: • The database may hold details of customers who have never placed an order (but may have received one, for example). • An order must include at least one product. • There may be some products that have never been ordered (eg, new products). • A product does not have to be made up of other products. • have to be a constituent of some other product. • An order is identified by an order number places Customer Order CustNo OrderNo Name DatePlaced Address DateDelivered Telephone receives includes Product Name Price Description is_made_of Note that there are two many-to-many relationships in the E-R model. It is possible to replace these relationships by new entities using the techniques described in lectures. In both cases it is appropriate to add a “quantity” attribute. The result will be something like this: places Customer Order CustNo OrderNo Name DatePlaced Address DateDelivered Telephone receivesincludes OrderLine OrderNo ...
-
Publié par
-
Langue
English