The Relational Data Model

The Relational Data Model

While the entity-relationship approach to data modeling that we discussed in "The Entity-Relationship Data Model" is a simple and suitable way to explain the structure of data, today's database implementations are almost always based on another approach, called the relational model. The relational model is very useful because it has but a single data-modeling concept: the "relation", a two-dimensional table in which data is arranged. We shall see in "The Database Language SQL" how the relational model supports a very high-level programming language called SQL (structured query language). SQL lets us write simple programs that control in powerful ways the data stored in relations. On the contrary, the E/R model normally is not considered appropriate as the basis of a data management language.

On the other hand, it is sometimes easier to design databases using the E/R notation. Therefore, our first goal is to see how to translate designs from E/R notation into relations. We shall then find that the relational model has a design theory of its own. This theory, often called "normalization" of relations, is based mostly on "functional dependencies", which embody and expand the concept of "key" discussed informally in "Keys in the E/R Model". Using normalization theory, we frequently improve our choice of relations with which to represent a specific database design. 

Basics of the Relational Model

The relational model gives us a single way to represent data: as a two-dimensional table called a relation. The following figure is an example of a relation. The name of the relation is Movies, and it is intended to hold information about the entities in the entity set Movies of our running design example. Each row corresponds to one movie entity, and each column corresponds to one of the attributes of the entity set. However, relations can do much more than represent entity sets, as we shall see

The relation Movies