Summary of The Entity-Relationship Data Model

Summary of The Entity-Relationship Data Model

The Entity/Relationship Model: In the E/R model we explain entity sets, relationships among entity sets, and attributes of entity sets and relationships. Members of entity sets are called entities.

Entity/Relationship Diagrams: We use rectangles, diamonds, and ovals to draw entity sets, relationships, and attributes, respectively.

Multiplicity of Relationships: Binary relationships can be one-one, many-one, or many-many. In a one-one relationship, an entity of either set can be connected with at most one entity of the other set. In a many-one relationship, each entity of the “many" side is connected with at most one entity of the other side. Many-many relationships place no restriction on multiplicity.

Keys: A set of attributes that uniquely determines an entity in a given entity set is a key for that entity set.

Good Design: Designing databases effectively requires that we represent the real world sincerely, that we select proper elements (e.g., relationships, attributes), and that we avoid redundancy - saying the same thing twice or saying something in an indirect or very complicated manner.

Referential Integrity: A requirement that an entity be attached through a given relationship, to an entity of some other entity set, and that the latter entity exists in the database, is called a referential integrity constraint.

Subclasses: The E/R model uses a special relationship isa to represent the fact that one entity set is a special case of another. Entity sets may be connected in a hierarchy with each child node a special case of its parent. Entities may have elements belonging to any subtree of the hierarchy, as long as the subtree contains the root.

Weak Entity Sets: An infrequent problem that arises in the E/R model is a weak entity set that requires attributes of some related entity set(s) to recognize its own entities. A special notation involving diamonds and rectangles with double borders is used to differentiate weak entity sets.