First page Back Continue Last page Image

Building a Database – The Product Table

Next we have to know what we are going to sell and our product table serves this function

salestransaction

stxid

PK

Not Null

productid

FK

Not Null

customerid

FK

Not Null

employeeid

FK

Null

saledate

Not Null

saleamount

Not Null

product

prdid

PK

Not Null

prdname

.

Not Null

prddesc

.

Null

prdinventory

.

Null

prcost

.

Null

Notice that the product table is connected to the salestransaction table with a relational link Primary Key (PK) to Foreign Key (FK)

I do not have to identify FK’s, but if I want to maintain Database Integrity it is a good idea