First page Back Continue Last page Image

Building a Database – Vendor Data

We also need to deal with Vendor contact information, keep in mind an organization is different from a person

purchasetransaction

purchid

int(5)

PK

Not Null

partid

int(5)

FK

Not Null

invoicenbr

int(5)

Null

vendorid

int(5)

FK

Null

employeeid

int(5)

FK

Null

purchdate

date

Not Null

purchamt

dec()

Not Null

vendor

vendorid

int(5)

PK

Not Null

vendornbr

int(5)

Not Null

vendorname

vc()

Not Null

venagent

vc()

Null

lastused

date

Null

firstused

date

Null

vendorparts

venprtid

int(5)

PK

Not Null

vendorid

int(5)

FK

Not Null

partid

int(5)

FK

Not Null

source

vc()

Null

price

date

Null

discount

date

Null

vendorphone

phoneid

int(5)

PK

Not Null

vendorid

int(5)

FK

Not Null

areacode

vc()

Null

prefix

vc()

Null

number

vc()

Null

countrycode

vc()

Null

vendoremail

emailid

int(5)

PK

Not Null

vendorid

int(5)

FK

Not Null

username

vc()

Null

attodot

vc()

Null

domain

vc()

Null

vendoraddress

addressid

int(5)

PK

Not Null

vendorid

int(5)

FK

Not Null

street

vc()

Null

city

vc()

Null

state

vc()

Null

tzip

vc()

Null

country

vc()

Null

You can abstract the contact table but keep in mind the further you abstract the more complicated it gets