Datasheet
Part I SQL Basic Concepts and Principles
them into tables (think of a file cabinet) alleviates the problem somewhat but does not remove
the major obstacles: data redundancy (the same information, or even worse, supposedly the same
information, might be stored more than once in different files), slow processing speed (‘‘I know
it was there somewhere ...’’), error-prone storage, and retrieval. Moreover, it required intimate
knowledge of the database structure to work at all — it would be utterly useless to search for,
say, orders information in the expenses file.
For example, you could design a flat database system for an order entry system that gathers
information about customers, orders the customers have placed, and products the customers have
ordered. If data is accumulated sequentially, your file will contain information about customers,
then orders and products, then about some new customer, and so on — all in the order the data
is entered (see Table 1-2). Just imagine a task of extracting any meaningful information from this
mess, not to mention that a lot of the cells will remain empty. (For ‘‘Ace Hardware,’’ what would
you put in the Quantity column; or for ‘‘Nails,’’ what would you put in the Address column?)
Dissatisfaction with these shortcomings stimulated development in the area of data storage-and-
retrieval systems.
Excel is often used to create flat file databases.
Hierarchical databases
The concept of a hierarchical database has been around since the 1960s and — believe it or
not — it is still in use. The hierarchical model is fairly intuitive. As the name implies, it stores
data in hierarchical structure, similar to that of a family tree, organization chart, or pyramid.
You could visualize a computer file system as it is presented through some graphical interface.
The most popular hierarchical database product is IBM’s Information Management System (IMS),
which runs on mainframe computers. First introduced in 1968, it is still around (after a number
of reincarnations), primarily because hierarchical databases provide impressive raw-speed perfor-
mance for certain types of queries.
TABLE 1-2
Sample Flat File Records
Name Type Address Price Quantity
Nails Product n/a 100 2000
Ace Hardware Customer 1234 Willow Ct Seattle, Washington n/a n/a
Cedar planks Product n/a 2000 5000
12