Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose that you have designed a database for Morgan Importing that has the foll

ID: 3831355 • Letter: S

Question

Suppose that you have designed a database for Morgan Importing that has the following tables:

EMPLOYEE (EmployeeID, LastName, FirstName, Department, Phone, Fax, EmailAddress)

STORE (StoreName, City, Country, Phone, Fax, EmailAddress, Contact)

ITEM (ItemID, StoreName, PurchasingAgentID, PurchaseDate, ItemDescription, Category, PriceUSD)

SHIPPER (ShipperID, ShipperName, Phone, Fax, EmailAddress, Contact)

SHIPMENT (ShipmentID, ShipperID, PurchasingAgentID, ShipperInvoiceNumber, Origin, Destination, ScheduledDepartureDate, ActualDepartureDate, EstimatedArrivalDate)

SHIPMENT_ITEM (ShipmentID, ShipmentItemID, ItemID, InsuredValue)

SHIPMENT_RECEIPT (ReceiptNumber, ShipmentID, ItemID, ReceivingAgentID, ReceiptDate, ReceiptTime, ReceiptQuantity, isReceivedUndamaged, DamageNotes)

1. 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 other adjustments to STORE and other tables that you think are appropriate.

2.Specify NULL/NOT NULL constraints for each table column.

3.Specify alternate keys, if any

4.State relationships as implied by foreign keys and specify the maximum and minimum cardinality of each relationship. Justify your choices.

5.Explain how you will enforce the minimum cardinalities in your answer to question 4. Use referential integrity actions for required parents, if any. Refer to your book diagram as a boilerplate for required children, if any.

Explanation / Answer

[1] Yes ,STORE should have a surrogate key.A surrogate key is any column or set of columns that can be declared as the primary key instead of a "real" or natural key. A surrogate is a candidate key. A table could actually have more than one surrogate key, although this would be unusual.

KEY 1 --> StoreName, City, Country

KEY 2 --> Phone, Fax, EmailAddress, Contact

---------------------------------------------------------------------------------------------------------------

(b)

Employee --> EmployeeId,FirstName,Department
STORE --> StoreName,City,Country
ITEM --> itemID,StoreName, PurchasingAgentID, PurchaseDate, ItemDescription, Category, PriceUSD
SHIPPER --> ShipperID, ShipperName
SHIPMENT --> ShipmentID, ShipperID, PurchasingAgentID, ShipperInvoiceNumber, Origin, Destination, ScheduledDepartureDate, ActualDepartureDate
SHIPMENT_ITEM --> ShipmentID, ShipmentItemID, ItemID
SHIPMENT_RECEIPT --> ReceiptNumber, ShipmentID, ItemID, ReceivingAgentID

---------------------------------------------------------------------------------------------------------------------------------

[c]  A. table has more than one candidate key, one of them will become the primary key and rest of all are called alternate keys.Alternate key, the column may not be primary key but still it is a unique key in the column.

ITEM --> PurchasingAgentID
SHIPMENT --> ShipperID,PurchasingAgentID
SHIPMENT_ITEM --> ShipmentID,ItemID, InsuredValue)
SHIPMENT_RECEIPT --> ShipmentID, ItemID

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote