Table Description
SalesRep All sales representativesthat work for the company. The
SalesReptable has the following columns:
rep_key An identifier for each sales representative.
Thisis the primary key.
name Thename of each sales representative.
TheSQL statement creating this table is as follows:
CREATE TABLE SalesRep (
rep_key CHAR(12) NOT NULL,
name CHAR(40) NOT NULL,
PRIMARY KEY (rep_key)
)
go
Customer Allcustomers that do business with the company. The
Customertable includes the following columns:
cust_key Anidentifier for each customer. This is the
primarykey.
name Thename of each customer.
rep_key Anidentifier for the sales representative in a
sales relationship. This is a foreign key to the SalesRep
table.
TheSQL statement creating this table is as follows:
CREATE TABLE Customer (
cust_key CHAR(12) NOT NULL,
name CHAR(40) NOT NULL,
rep_key CHAR(12) NOT NULL,
FOREIGN KEY ( rep_key )
REFERENCES SalesRep,
PRIMARY KEY (cust_key)
)
go
150