Databases Reference
In-Depth Information
Chapter 2. The Entity-Relationship Model of a
Database
Let us begin our discussion of database design by looking at an informal database model
called the entity-relationship model . This model of a relational database provides a
useful perspective, especially for the purposes of the initial database design.
I will illustrate the general principles of this model with the LIBRARY database example,
which I will carry through the entire topic. This example database is designed to hold
data about the topics in a certain library. The amount of data we will use will be kept
artificially small—just enough to illustrate the concepts. (In fact, at this point, you may
want to take a look at the example database. For details on downloading it from the
Internet, or on using Microsoft Access to create it yourself, see Appendix D . ) In the next
chapter, we will actually implement the entity-relationship (E/R) model for our
LIBRARY database.
2.1 What Is a Database?
A database may be defined as a collection of persistent data. The term persistent is
somewhat vague, but is intended to imply that the data has a more-or-less independent
existence or that it is semipermanent . For instance, data stored on paper in a filing
cabinet, or stored magnetically on a hard disk, CD-ROM, or computer tape is persistent,
whereas data stored in a computer's memory is generally not considered to be persistent.
(The term permanent is a bit too strong, since very little in life is truly permanent.)
Of course, this is a very general concept. Most real-life databases consist of data that
exist for a specific purpose and are thus persistent.
2.2 Entities and Their Attributes
The purpose of a database is to store information about certain types of objects. In
database language, these objects are called entities . For example, the entities of the
LIBRARY database include books, authors, and publishers.
It is very important at the outset to make a distinction between the entities that are
contained in a database at a given time and the world of all possible entities that the
database might contain. The reason this is important is that the contents of a database are
constantly changing and we must make decisions based not just on what is contained in a
database at a given time, but on what might be contained in the database in the future.
For example, at a given time, our LIBRARY database might contain 14 book entities.
However, as time goes on, new topics may be added to the database, and old topics may
be removed. Thus, the entities in the database are constantly changing. If, for example,
based on the fact that the 14 topics currently in the database have different titles, we
decide to use the title to identify each topic uniquely, we may be in for some trouble
 
 
 
Search WWH ::




Custom Search