Designing a Database

A simple database such as one that is used to create a personal phone directory can be created without considering the size of the database or its structure. To set up a database for use in a business application, however, a developer should follow the steps outlined in this section. It is essential that careful thought be given to database design.

The design should accomplish three objectives:

  1. Organize data generated by a business so that it can be easily accessed and manipulated.

  2. Establish relationships among all the pieces of data.

  3. Determine what information is useful for display in reports.

Before structuring the database, consider these points:

The flexibility exists to change the database after it has been set up, but the user should establish the structure of the database before actually creating it. The most important thing is to establish the sequence of attributes, values, and subvalues in a data file item. It is cumbersome and time-consuming to change these relationships once they have been defined.

Use the following checklist to design a database:

Most of these decisions are reflected in the dictionary’s Attribute Definition items.

The CUSTOMERS File

In this section we are going to look at another sample file, the CUSTOMERS file, that contains the names and addresses of customers for a mail-order business.

For each customer, we store the person’s first and last names, street address, city, state, zip and the person’s phone number. Each of these pieces of data is stored in an attribute of a data file item that is unique to the customer.

See Also

Creating a Database

Creating a File

Extracting Information