First page Back Continue Last page Image

Building a Database – Employees

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

product

prdid

int(5)

PK

Not Null

prdname

vc()

FK

Not Null

prddesc

vc()

FK

Null

prdinventory

int(5)

FK

Null

prcost

dec()

Null

customer

customerid

int(5)

PK

Not Null

custnumber

int(5)

Not Null

custfname

vc()

Null

custmname

vc()

Null

custlname

vc()

Null

We are almost done hooking up the salestransaction table, we just need the employee table

phone

phoneid

int(5)

PK

Not Null

customerid

int(5)

FK

Not Null

areacode

vc()

Null

prefix

vc()

Null

number

vc()

Null

countrycode

vc()

Null

email

emailid

int(5)

PK

Not Null

customerid

int(5)

FK

Not Null

username

vc()

Null

attodot

vc()

Null

domain

vc()

Null

address

addressid

int(5)

PK

Not Null

customerid

int(5)

FK

Not Null

custstreet

vc()

Null

custcity

vc()

Null

custstate

vc()

Null

custzip

vc()

Null

custcountry

vc()

Null

employee

employeeid

int(5)

PK

Not Null

empnumber

int(5)

FK

Not Null

empfname

vc()

FK

Not Null

empmname

vc()

FK

Null

emplname

vc()

Not Null

empposition

vc()

Null

emptier

vc()

Null

emphiredate

date

Not Null

You need to deal with employee contact information as well but there are multiple ways of handling this

For now use what we did with customer as a guide