First page Back Continue Last page Image

Building a Database – Add Employee to Tx

If you are going to reward Employees based on Sales, you need to know who sells what, so let’s fix our table

salestransaction

stxid

PK

Not Null

productid

FK

Not Null

customerid

FK

Not Null

employeeid

FK

Null

saledate

Not Null

saleamount

Not Null

The Other Design Attributes

PK= Primary Key (Make each record in this table unique

FK= Link to a Primary Key From another Table

NULL or Not Null: Can this field be left blank?

We now have a functional transaction table and we are ready to proceed

Notice that this table is a table of mostly keys