Anda di halaman 1dari 2

1) Design a database diagram for a product orders database with four tables.

Indicate the relationships between tables and identify the primary key and foreign keys in each table. Explain your design decisions.

Customers
CustomerID CustomerName CustomerAddress CustomerPhone

Orders
OrderID CustomerID OrderDate ShipAddress ShipDate

OrderLineItems
OrderID OrderSequence ProductID Quantity UnitPrice

Products
ProductID ProductName QtyPerUnit UnitPrice InStock OnOrder

2) Add the two tables below into the design for exercise 1. Create additional tables and columns, if necessary. Explain your design decisions.

Customers
CustomerID CustomerName CustomerAddress CustomerPhone

Orders
OrderID CustomerID OrderDate ShipAddress ShipDate

OrderLineItems
OrderID OrderSequence ProductID Quantity UnitPrice

Products
ProductID ProductName QtyPerUnit UnitPrice InStock OnOrder

Shippers
ShipperID ShipperName ShipperAddress ShipperPhone

Employees
EmployeeID FirstName LastName SSM HireDate

3) Modify your design for exercise 2 to identify the columns that should be indexed, and explain your decision. 4) Design a database diagram that allows individuals to be assigned membership in one or more groups. Each group can have any number of individuals and each individual can belong to any number of groups. Create additional tables and columns, if necessary. Explain your design decisions. Part B: AUTHOR AuthorID ALName AFName Au-Bk (AuthorID ISBN-No) BOOK ISBN-No BookTitle (AuthorID Copies PublisherID) BOOKCOPY CallNum (ISBN-No) Condition Status

PUBLISHER PublisherID PublisherName

LOANDETAILS *(LoanID+ CallNum) DueDate ReturnDate

LOAN LoanID (MemberID) LoanDate

MEMBER MemberID MLName MFName Address Status Membership Date

Anda mungkin juga menyukai