customer |
|||
customerid |
int(5) |
PK |
Not Null |
custnumber |
int(5) |
Not Null |
|
custfname |
vc() |
Null |
|
custmname |
vc() |
Null |
|
custlname |
vc() |
Null |
Here is a more proper configuration for customer data, notice how the customerid links all the tables together
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 |
|
|||
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 |
In this configuration the customer can have as many email addresses as they want and our database handles it
We may not want this level of detail all the time