Chapter Objectives
To define the term data structures
To define and illustrate the terms flat file, sequential list, linked list, and index
To define and illustrate B-tree multilevel indexes
To demonstrate how binary relationships are represented using trees, simple networks, and
complex networks
To define and illustrate primary and secondary keys
To define and illustrate unique and nonunique secondary keys
What is the Purpose of this Appendix?
All operating systems provide data management services. These services, however, are generally not
sufficient for the specialized needs of a DBMS. Therefore, to enhance performance, DBMS products
build and maintain specialized data structures, which are the topic of this appendix.
What Will This Appendix Teach Me?
We begin by discussing flat files and some of the problems that can occur when such files need to be
processed in different orders. Then, we turn to three specialized data structures: sequential lists, linked
lists, and indexes (or inverted lists). Next, we illustrate how each of three special structures—trees, simple
networks, and complex networks—are represented using various data structures. Finally, we explore
how to represent and process multiple keys.
Although a thorough knowledge of data structures is not required to use most DBMS products, this
background is essential for database administrators and systems programmers working with a DBMS.
Being familiar with the data structures also helps you evaluate and compare database products.
What are Flat Files?
A flat file is a file that has no repeating groups. Figure H-1(a) shows a flat file, and Figure H-1(b) shows a
file that is not flat because of the repeating field Item. A flat file can be stored in any common file organization,
such as sequential, indexed sequential, or direct. Flat files have been used for many years in
commercial processing. They are usually processed in some predetermined order—for example, in an
ascending sequence on a key field.