Entity Set

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

Other Kinds of Constraints

As already mentioned at the beginning of this section, there are other kinds of constraints one could wish to enforce in a database. We shall only touch briefly on these here, with the

Weak Entity Sets

There is a special condition in which an entity set's key is consisting of attributes some or all of which belong to another entity set. Such an entity set is called a weak entity set.

Page 2 of 4 Previous 1 2 3 4 Next