This module discussed the order to create an ER diagram and how entities relate to each other. You explored two related, but different aspects of entity relationships:
- the types of relationships that can exist between entities (1:1, 1:N, and M:N), as well as the
- types of participation entities have in relationships (mandatory or optional).
In the next module, you will learn how these are incorporated symbolically into an ER diagram.
Entity Relationship (ER) is a conceptual data modeling technique used to represent the relationships between different entities in a system. ER diagrams are graphical representations of these relationships, consisting of entities, attributes, and relationships between the entities. The technique was first introduced by Peter Chen in 1976 and has since been widely adopted in the field of database design and information systems.
In ER modeling, an entity refers to a real-world object or concept that is distinguishable from other objects or concepts. Entities are represented as rectangles in ER diagrams and contain attributes that describe the characteristics of the entity. Attributes are represented as ovals in ER diagrams and are connected to their respective entities by lines.
ER diagrams also include relationships, which are connections between entities that describe how they are related to each other. Relationships are represented as diamonds in ER diagrams, with lines connecting them to the entities involved. Relationships can be classified as one-to-one, one-to-many, or many-to-many, depending on the number of entities involved in the relationship.
- One-to-one relationships describe a situation where one instance of an entity is related to only one instance of another entity. For example, a person can have only one social security number, and a social security number can be associated with only one person.
- One-to-many relationships describe a situation where one instance of an entity is related to multiple instances of another entity. For example, a customer can have multiple orders, but each order is associated with only one customer.
- Many-to-many relationships describe a situation where multiple instances of an entity are related to multiple instances of another entity. For example, a student can take multiple courses, and each course can be taken by multiple students.
ER modeling is an important technique in database design as it helps to ensure that the relationships between entities are properly defined and structured. By using ER diagrams to model the relationships between entities, businesses and organizations can create efficient and effective information systems that accurately reflect their real-world operations.
This module introduced you to the following terms:
- composite entity: In relational database design, a composite entity is used to provide an indirect link between two entities in a M:N (many-to-many) relationship. Also called a linking table.
- composite key attribute: A key attribute belonging to a composite entity, comprising the key attributes from each of the two entities linked by the composite entity. Also called a composite primary key.
- entity relationship: Entities that participate in a relationship are associated; the three types of entity relationships (associations) are one-to-one, one-to-many, and many-to-many.
- linking table: Another name for a composite entity. Used to provide an indirect link between two entities in a M:N (many-to-many) relationship.
- mandatory entity: In the language of relational database design, mandatory entity is another name for the entity that has mandatory participation in an entity relationship.
- mandatory participation: In the language of database design, participation describes the nature of the relationship between two tables. Mandatory participation describes a relationship in which least one record in a table must exist before any records can be added to its associated table.
- many-to-many relationship: In relational database design, a many-to-many (M:N) relationship exists when, for one instance of entity A, there exists zero, one, or many instances of entity B; and for one instance of entity B, there exists zero, one, or many instances of entity A.
- one-to-many relationship: In relational database design, a one-to-many (1:N) relationship exists when, for one instance of entity A, there exists zero, one, or many instances of entity B; but for one instance of entity B, there exists zero or one instance of entity A.
- one-to-one relationship: In relational database design, a one-to-one (1:1) relationship exists when zero or one instance of entity A can be associated with zero or one instance of entity B, and zero or one instance of entity B can be associated with zero or one instance of entity A.
- optional participation: In the language of database design, participation refers to the nature of the relationship between tables. Optional participation describes a relationship in which no records need to exist in a table before records are added to its associated table.
- redundant data: Duplicate data in a database; although redundant data can never be totally removed, a major goal of database design is to eliminate as much redundant data as possible.
- weak entity: In the language of relational database design, weak entity is another name for the entity that has optional participation in an entity relationship.
The next module explains how to create an entity-relationship (ER) diagram.