The Customer and Order schemes are the same as we described in
earlier pages. You may skip to the new material here.
The Customers relation scheme attributes are:
- Customer I.D., an arbitrary number or other unique identifier that we specify.
- Customer first name, a person's first name.
- Customer last name, a person's last name.
- Customer phone, a valid telephone number.
- Customer street, a street address.
- Customer zip code, a zip code designated by the United States Postal Service.
The primary key attribute of the Customers relation is the Customer I.D.;
the attributes first name, last name, and phone are a candidate key.
The Orders relation scheme attributes are:
- Customer I.D., foreign key from Customers.
- Order date, a calendar date possibly with the clock time.
- Sold by, the first name of the sales person taking the order.
The primary key attributes of the Orders relation are the foreign key
Customer I.D. plus the order date.
The Order lines relation scheme attributes are:
- Customer I.D., foreign key from Orders
- Order date, foreign key from Orders
- Universal product code, foreign key from Products
- Quantity, an integer.
- Unit sale price, a dollar value.
The primary key attributes of the Order lines relation are the foreign keys
from both the Orders and the Products schemes.
The Products relation scheme attributes are:
- Universal product code (or UPC), an external key supplied by the manufacturer.
- Product name, supplied by the manufacturer.
- Manufacturer, a company name.
- Model, a designation supplied by the manufacturer.
- Unit list price, a dollar value.
- Units in stock, an integer.
The primary key attribute of the Products relation is the universal
product code; the attributes manufacturer and model are a candidate key.
Return to main page