Table Description
Customer All customers 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 REFERENCES SalesRep,
PRIMARY KEY (cust_key)
)
Contact All individualcontacts that do business with the company.
Each contact belongs to a single customer. The Contact
tableincludes the following columns:
contact_key An identifier for each contact. This is
theprimary key.
name Thename of each contact.
cust_key Anidentifier for the customer to which the
contact belongs. This is a foreign key to the Customer
table.
TheSQL statement creating this table is:
CREATE TABLE Contact (
Contact_key CHAR(12) NOT NULL,
Name CHAR(40) NOT NULL,
Cust_key CHAR(12) NOT NULL,
FOREIGN KEY REFERENCES
Customer,
PRIMARY KEY (contact_key)
)
Replicationgoals Thegoals of the design are to provide each sales representative with the
followinginformation:Thecomplete SalesRep table.Thosecustomers assigned to them, from the Customer table.106