Deciding on Attributes and Definitions

To create a database, it is necessary to define the data:

Name

The name of the person on file.

Names can be separated as:

Title

Senator

Dr.

Mr.

First

Battson

Sarah

Noah

Middle

D.

 

O.

Last

Belfrie

Bellam

Pinyon

Extension

Jr.

Ph.D.

 

This example uses First name and Last name.

Address

The mailing address. U.S. addresses can be separated as:

Care-of name

Corporation name

Street number, Street name, Apartment number,

Additional directions

City

State

Zip Code

This example uses Street Address, City, State, Zip code and Country.

Telephone

Number

U.S. telephone numbers can be separated as:

 

Area Code

Exchange

Number

Extension

 

 

(714)

261

7425

100

 

 

Telephone numbers can also be differentiated as:

Home

Work

Cellular

Pager

Fax

Modem

International telephone numbers are more difficult, because in addition to the two or three digit country code, each country has its own city and exchange codes, and a different way of displaying the groupings.

This example uses phone number category and phone number.

Next, decide how each of these attributes are stored.

1

First Name

Person’s first name is a text string, stored as is.

2

Last Name

Person’s last name is a text string, stored as is.

3

Street Address

Street portion of the address is not limited to the length of any attribute, but for practical reasons assume that mailing labels have a limit of 30 characters across. If necessary, this can be MultiValued to have several address lines.

4

City

City portion of the address is a text string.

5

State

State portion of the address is the two digit state code for U.S. addresses.

6

Zip Code

Zip code portion of the address is the Zip + 4 code for U.S. addresses.

7

Country

Country portion of the address is assumed to be U.S.A. if null.

8

Phone Category

This describes the type of telephone associated with the phone number (for example, home phone, work phone, fax, cellular, auto cellular, pager, modem).

9

Phone Number

Telephone number is a seven digit number for numbers within the same area code, or a ten digit number for numbers outside the area code.

10

Item-ID

File-defining item correlative is set up to assign new item-IDs as sequential numbers.

The database attributes are further defined, and the size of our database is approximated as follows:

0

Item-ID

4

1

First name

8

2

Last name

8

3

Street address

15

4

City

15

5

State

2

6

Zip Code

5

7

Country

0

8

Phone category

2

9

Phone number

10

 

Total

65

The phone category attribute may reference a phone category file to keep the categories homogeneous. Also, the phone category attribute can be a controlling attribute of the phone number attribute, and keep the category and number on a one to one correlation.

See Also

Sample Database Design and Creation

Creating the File

Creating Attribute-Defining Items

Editing the File-Defining Item

Creating Indexes

Connecting to the Database