Chapter 3. Implementing Entity-Relationship Models: Relational Databases

An E/R model of a database is an abstract model, visualized through an E/R diagram. For this to be useful, we must translate the abstract model into a concrete one. That is, we must describe each aspect of the model in the concrete terms that a database program can manipulate. In short, we must implement the E/R model. This requires implementing several things:

  • The entities

  • The entity classes

  • The entity sets

  • The relationships between the entity classes

The result of this implementation is a relational database.

As we will see, implementing the relationships usually involves some changes to the entity classes, perhaps by adding new attributes to existing entity classes or by adding new entity classes.

Implementing Entities

As discussed in the previous chapter, an entity is implemented (or described in concrete terms) simply by giving the values of its attributes. Thus, the following is an implementation of a Books entity:

Title = Gone With the Wind
ISBN = 0-12-345678-9
Price = $24.00

Implementing Entity Classes—Table Schemes

Since the entities in an entity class are implemented by giving their attribute values, it makes sense to implement an entity class by the set of attribute names. For instance, the Books entity class can be identified with the set:

{ISBN,Title,Price}

(We will add the PubID attribute name later, when we implement the relationships.)

Since attribute names are usually used as column headings for a table, ...

Get Access Database Design & Programming, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.