The Entity-Relationship Data Model

Avoiding Redundancy

We should be careful to say everything once only. For example, we have used a relationship Owns between movies and studios. We might also choose to have an attribute studioName of

Simplicity Counts

Avoid introducing more elements into your design than is really needed.

Choosing the Right Relationships

Entity sets can be joined in different ways by relationships. However, adding to our design every possible relationship is not often a good idea. First, it can lead to redundancy, where

Picking the Right Kind of Element

Sometimes we have options about the type of design element used to represent a real-world conception. Many of these choices are between using attributes and using entity

The Modeling of Constraints

We have studied so far how to model a slice of the real world using entity sets and relationships. However, there are a number of other important features of the real world that

Keys in the E/R Model

A key for an entity set E is a set K of one or more attributes such that, given any two separate entities e1 and e2 in E, e1 and e2 cannot have the same values for each of the

Representing Keys in the E/R Model

In our E/R diagram notation, we underline the attributes belonging to a key for an entity set. For instance, the following figure reproduces our E/R diagram for movies, stars, and studios

Single-Value Constraints

Sometimes, an important property of a database design is that there is at most one value playing a specific role. For instance, we assume that a movie entity has a unique title, year,

Referential Integrity

While single-value constraints show that at most one value exists in a given role, a referential integrity constraint asserts that exactly one value exists in that role. We could see

Referential Integrity in E/R Diagrams

We can extend the arrow notation in E/R diagrams to show whether a relationship is expected to support referential integrity in one or more directions. Suppose R is a relationship from

Page 2 of 3 Previous 1 2 3 Next