Suppose that you have designed a database for Morgan Importing that has the foll
ID: 3718398 • Letter: S
Question
Suppose that you have designed a database for Morgan Importing that has the following tables EMPLOYEE (EmployeelD, LastName, FirstName, Department, Phone, Fax EmailAddress) STORE (StoreName, City, Country, Phone, Fax, EmailAddress, Contact) ITEM (ltemID, StoreName, PurchasingAgentlD, PurchaseDate, ltemDescription, Category PriceUSD) SHIPPER (ShipperID. ShipperName, Phone, Fax, EmailAddress, Contact) SHIPMENT (ShipmentlD. ShipperlD, PurchasingAgentID, ShipperlnvoiceNumber, Origin, Destination, Scheduled DepartureDate, ActualD epartureD ate, E stimatedArrivalDate) SHIPMENT ITEM (ShipmentlD. ShipmentltemID, ItemID, InsuredValue) SHIPMENT RECEIPT (ReceiptNumber. ShipmentiD, ItemID,92 Receiving AgentiD, ReceiptDate, ReceiptTime, ReceiptQuantity, isReceivedUndamaged, DamageNotes) A. Do you think STORE should have a surrogate key? If so, create it and make required adjustments in the design. If not, explain why not or make any other adjustments to STORE and other tables that you think are appropriate. B. Specify NULL/NOT NULL constraints for each table column. C. Specify alternate keys, if any. D. State relationships as implied by foreign keys, and specify the maximum and minimum cardinality of each relationship. Justify your choices. E. Explain how you will enforce the minimum cardinalities in your answer to part D. Use referential integrity actions for required parents, if any. Use Figure 6-29(b) as a boilerplate for required children, if any.Explanation / Answer
a. There is no need of surrogate key in the STORE table. Because in the STORE table storename is enough to uniquely identify the other data. Store table absolutly fine with the present condition because foreign key to the storename is already implemented in the other required tables.
Though we don't need to change STORE table, we need to alter the Employee table because we at present we don't know which employee is working in which store. inorder to know that we need to add the storename attribute to the Employee table. So that it will be more meaningfull.
b. The below are the attributes which needs to be implemented with Not Null Constraint.
c) The below are the attributes that needs to be implemented with Unique Constraint
d)
As we stated in question a we have to add attribute StoreName in EMPLOYEE table. This is also a foreign key to the attribute in STORE table.
The min and max cardinality of this is 1 : 1 because one employee can work for one store only.
The min and max cardinality of this is 1 : M because one Item is available is many stores.
The min and max cardinality of ShipperID is 1 : 1 because it is possible to ship one shipment by only one shipper.
The min and max cardinality of PurchsingAgentID is 1:M becasue there is possiblity to buy one shipment from many purchasing agents.
The min and max cardinality of ShipmentID and the ItemID to other tables is M:N because there is possibility that many shipments contains many items.
The min and max cardinality of ShipmentID is 1:1 because there will be one receipt for each shipment.
-> As per the chegg policy i am allowed to answer only 4 parts . Kindly understand and post the remaining as new post.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.