Appendix B: Database Schemas
Region
PK RegionID
RegionDescription
Shippers
PK ShipperID
CompanyName
Phone
Orders
PK OrderID
FK1 CustomerID
FK2 EmployeeID
OrderDate
RequiredDate
ShippedDate
FK3 ShipVia
Freight
ShipName
ShipAddress
ShipCity
ShipRegion
ShipPostalCode
ShipCountry
Employees
PK EmployeeID
LastName
FirstName
Title
TitleOfCourtesy
BirthDate
HireDate
Address
City
Region
PostalCode
Country
HomePhone
Extension
Photo
Notes
ReportsTo
PhotoPath
Suppliers
PK SupplierID
CompanyName
ContactName
ContactTitle
Address
City
Region
PostalCode
Country
Phone
Fax
HomePage
Categories
PK CategoryID
CategoryName
Description
Picture
CustomerCustomerDemo
PK,FK2 CustomerID
PK,FK1 CustomerTypeID
Territories
PK TerritoryID
TerritoryDescription
FK1 RegionID
Products
PK ProductID
ProductName
FK2 SupplierID
FK1 CategoryID
QuantityPerUnit
UnitPrice
UnitsInStock
UnitsOnOrder
ReorderLevel
Discontinued
CustomerDemographics
PK CustomerTypeID
CustomerDesc
EmployeeTerritories
PK,FK1 EmployeeID
PK,FK2 TerritoryID
Customers
PK CustomerID
CompanyName
ContactName
ContactTitle
Address
City
Region
PostalCode
Country
Phone
Fax
Order Details
PK,FK1 OrderID
PK,FK2 ProductID
UnitPrice
Quantity
Discount
Northwind
Database
Diagram
member
PK member_no
lastname
firstname
middleinitial
photograph
item
PK isbn
FK1 title_no
translation
cover
loanable
reservation
PK,FK1 isbn
PK,FK2 member_no
log_date
remarks
juvenile
PK,FK2 member_no
FK1 adult_member_no
birth_date
title
PK title_no
title
author
synopsis
loan
PK,FK1 isbn
PK,FK1 copy_no
FK3 title_no
FK2 member_no
out_date
due_date
loanhist
PK,FK1 isbn
PK,FK1 copy_no
PK out_date
FK2 title_no
member_no
due_date
in_date
fine_assessed
fine_paid
fine_waived
remarks
adult
PK,FK1 member_no
street
city
state
zip
phone_no
expr_date
copy
PK,FK1 isbn
PK copy_no
FK2 title_no
on_loan
Library
Database Diagram
sales
PK,FK1 stor_id
PK ord_num
PK,FK2,I1 title_id
ord_date
qty
payterms
employee
PK emp_id
I1 fname
I1 minit
I1 lname
FK1 job_id
job_lvl
FK2 pub_id
hire_date
stores
PK stor_id
stor_name
stor_address
city
state
zip
jobs
PK job_id
job_desc
min_lvl
max_lvl
titleauthor
PK,FK1,I1 au_id
PK,FK2,I2 title_id
au_ord
royaltyper
pub_info
PK,FK1 pub_id
logo
pr_info
authors
PK au_id
I1 au_lname
I1 au_fname
phone
address
city
state
zip
contract
titles
PK title_id
I1 title
type
FK1 pub_id
price
advance
royalty
ytd_sales
notes
pubdate
publishers
PK pub_id
pub_name
city
state
country
roysched
FK1,I1 title_id
lorange
hirange
royalty
discounts
discounttype
FK1 stor_id
lowqty
highqty
discount
Pubs
Database
Diagram