Datasheet
9
Chapter 1 ✦ What Is a Database?
✦ Are calculations necessary? The more complex the calculations, the more you
need a database program.
✦ Is printed output required? Unless photocopies are satisfactory, use a database
program.
✦ Are reports necessary? Database programs excel at summarizing information.
If your reports go beyond simple record counts, a database program might be
the best choice.
Flat-File and Relational Databases
You can roughly classify every database program as either flat-file or relational,
according to the program’s relational capabilities: that is, its capability to simultane-
ously draw information from more than one table on the basis of shared fields.
That explanation is quite a mouthful, isn’t it? A couple of definitions and an exam-
ple might make it easier to swallow:
✦ A flat-file database always consists of a single table. All required fields must be
contained within that table.
✦ A relational database consists of at least two interrelated tables that have at
least one key field in common.
When you’re creating a relational database, instead of designing a single customer
table that contains all your customer information (as you would in a flat-file data-
base program), you might create several smaller tables. For example, you could
create one table called Addresses to contain just customer addresses, and another
called Orders to hold information about the customers’ previous orders. To link the
records in the two tables, you could assign a unique identification number to each
customer. By placing this ID field in both tables, you can relate the two sets of infor-
mation. For example, you can generate a statement from entries in the Orders table
and instruct the program to pull the customer’s mailing address from the Addresses
table after finding the record that contains the matching ID number, as shown in
Figure 1-2.
Both types of database programs have advantages. Conceptually, flat-file database
programs are easier to understand and learn to use. All the important data is in a
single table. If you must record additional information, you just add more fields to
the table.
On the other hand, because of the multitable approach that relational database pro-
grams use, the tables tend to be smaller and, hence, faster to work with for com-
mon tasks, such as sorting and searching. Because of their power and flexibility,
relational database programs are frequently used for large record-keeping projects
06_082771_ch01.qxp 8/25/06 3:23 PM Page 9