Chapter Five – Database Design
ANSWERS TO THE QUEEN ANNE CURIOSITY SHOP PROJECT QUESTIONS
Convert the data model you constructed for the Queen Anne Curiosity Shop in part D at
the end of Chapter 4 (or an equivalent data model that your instructor provides for you to
use) into a relational database design for the Queen Anne Curiosity Shop. Document
your database design as follows.
A. Specify tables, primary keys, and foreign keys. Using Figures 5–26 and 5-28 as guides,
specify column properties.
See the E-R diagram in part D. See MySQL Workbench file DBC-e08-CH05-QACS.mwb.
• EMPLOYEE could be N:M to SALE.
Discuss such possibilities with your students.
PERSON (PersonID, isEmployee, isCustomer, LastName, FirstName, Address, City, State, ZIP,
Phone, Email)
CUSTOMER (PersonID, CreditCardType, CreditCardNumber, CreditCardExpirationDate)
EMPLOYEE (PersonID, DateOfHire, HourlyPayRate)
SALE (SaleID, CustomerPersonID, EmployeePersonID, SaleDate, SubTotal, Tax, Total,)