Database Reference
In-Depth Information
unsure about. Remember, you are solving the customer's problem, so your
job is to help people tell you what they know, and not to plant thoughts in
their heads or steer them.
Robyn tells us that when Mountain View tracks an address, it needs to
know the street address, city, state, and ZIP code. Occasionally, shipments
go to Canada, so it's decided to track region instead of state. This decision
gives the system the flexibility to store data about countries that do not
have states. Additionally, we now need to track the country in which the
customer lives.
There are also a few other obvious pieces of data that we need to track.
First and last name, e-mail address, an internal customer ID, and the user's
password for the site are the remaining attributes that Mountain View
tracks for its customers. You should also find out which pieces of data are
required and which could be left out. This will tell you whether the attri-
bute can allow null data.
Table 6.2 shows the complete list of attributes for the customer entity,
the data type, nullability, and a description of the attribute.
Table 6.2
A C o m p l e t e L i s t o f A t t r i b u t e s f o r t h e C u s t o m e r E n t i t y
Attribute
Data Type
Nullability
Description
CustomerID
INT
NOT NULL
An internal number that is generated for
each customer for tracking purposes
EmailAddress
VARCHAR(50)
NULL
The customer's e-mail address
FirstName
VARCHAR(15)
NOT NULL
The customer's first name
LastName
VARCHAR(50)
NOT NULL
The customer's last name
HomePhone
VARCHAR(15)
NULL
The customer's home phone number
WorkPhone
VARCHAR(15)
NULL
The customer's work phone number
MobilePhone
VARCHAR(15)
NULL
The customer's cell phone number
AddressLine1
VARCHAR(50)
NOT NULL
Used to store the street address
AddressLine2
VARCHAR(50)
NULL
For extended address information such as
apartment or suite
City
VARCHAR(30)
NOT NULL
The city the customer lives in
Region
CHAR(2)
NOT NULL
The state, province, etc. of the customer;
used to accommodate countries outside the
United States
Country
VARCHAR(30)
NOT NULL
The country the customer lives in
ZipCode
VARCHAR(10)
NOT NULL
The customer's postal code
WebLogonPassword
VARCHAR(16)
NULL
For customers with a Web site account, a
field to hold the encrypted password
Search WWH ::




Custom Search