First page Back Continue Last page Image

Sales Transaction - Detail

Remember our first table? The salestransaction table? We need to add a table that covers the details or line items for the transaction

This table holds the details for each transaction, it can have one record for one transaction (if someone purchases just one item) or many records for one transaction

salestransaction

stxid

int(5)

PK

Not Null

productid

int(5)

FK

Not Null

customerid

int(5)

FK

Not Null

employeeid

int(5)

FK

Null

saledate

date

Not Null

saleamount

dec()

Not Null

salestransactiondetail

stxdetid

int(5)

PK

Not Null

stxid

int(5)

FK

Not Null

productid

int(5)

FK

Not Null

quantity

int(5)

Not Null

Unit Price

dec()

Not Null

discount

dec()

Not Null