Entity-Relationship Modeling



index
Disabled back button Next Section
printable version

Section 0: Module Objectives or Competencies
Course Objective or Competency Module Objectives or Competency
The student will be able to develop the logical design of the database using data modeling concepts such as entity-relationship diagrams. The student will be able to explain why Entity-Relationship Modeling is used to analyze and design the logical database model.
The student will be able to evaluate and use various E-R modeling approaches such as Chen and Crow's Foot.
The student will be able to analyze database requirements and determine the entities involved in the system and their relationship to one another. The student will be able to recognize and model entities, attributes, and relationships.
The student will be able to recognize and model unary, binary, and ternary relationships.
The student will be able to recognize and model one-to-one, one-to-many, and many-to-many relationships.
The student will be able to explain why the one-to-many relationship is the relational ideal.
The student will be able to determine connectivity and cardinality and model them correctly in the logical database.
The student will be able to recognize and model existence dependencies, weak entities, mandatory relationships, and optional relationships.
The student will be able to recognize and depict the composite relationships needed to model many-to-many relationships.
The student will be able to recognize and model recursive entities as well as generalization hierarchies.
Section 1: Justification

Problem

Requirement

Solution

Section 2: E-R Model

Entities

Attributes



Importance

Entities will become tables in the physical model, and attributes will become columns of each table.

Section 3: Attribute Types

Simple Attributes

Composite Attributes

Single-Valued Attributes

Multivalued Attributes

Derived Attributes

Section 4: Relationships



Note that the symbols used in the Crow's Foot notation are explained in the next section.



Importance

Relationships are important because they indicate that the entities (tables) involved in the relationship will have a primary key to foreign key link in the physical model.

Section 5: Connectivity


The symbols used to indicate connectivity and cardinality in the Crow's Foot notation are shown below:

Crow's Foot Symbols.


Importance

Connectivity (relationship classification) determines which entity (table) involved in the relationship has the primary key and which has a foreign key) in the physical model. For example, in a 1:M relationship the primary key of the "1" appears as a foreign key in the table of the "M". A future lecture will elaborate on Rules Governing Relationships.

Section 6: Cardinality
Section 7: Existence Dependence & Weak Entities

Existence Dependency

Weak Entity



Importance

In a physical database, an existence dependency means that there is a requirement for records to exist in a table before any records can be added to the associated table.

A weak entity does not have sufficient attributes to form a primary key so its key is a result of the relationship with the dominant entity.

Section 8: Relationship Participation

Relationship participation is related to existence dependence.

It is sometimes referred to as ordinality, which describes the relationship as either mandatory or optional.

Relationship participation may also be referred to as participation constraints.



Importance

In a physical database a mandatory relationship means that there is a requirement for records to exist in a table before any records can be added to the associated table.

In a physical database an optional relationship exists for a table when there is no requirement for any records to exist in that table before any records can be added to the associated table.

Section 9: Recursive Relationship


Importance

The semantics of recursive relationships are quite difficult to grasp because entities carry out different roles in relationships.

If you're in a silly mood, see this link for further reflection.

Section 10: Composite Entities

Recall the discussion of composite entities from the notes on Relational Databases.



Importance

As noted above, composite entities provide the mechanism by which two entities can be linked in an M:N relationship.

Section 11: Supertypes and Subtypes
Section 12: E-R Component Summary for Chen Model
E-R Component Summary.
Section 13: Modeling Approaches

So far we have used the Chen model for our E-R diagrams, but there are other modeling approaches. The Crow's foot model is probably the most widely used, although I prefer Chen for the purpose of teaching concepts. The figure below shows a comparison of the E-R modeling symbols.

Comparison of E-R Modeling Systems.



Crow’s Foot Notation

More on Crow's Foot. Crow's Foot Symbols.
Section 14: Examples

The figures below show representations of an invoicing system using the two modeling approaches.

Chen Representation.



Crow's Foot Representation.