ER Models: Entity-Relationship Diagrams, Relationships, Cardinality, 1:n, n:m, Mapping
This post is a glossary entry on ER models, complete with exam questions and tags.
In a Nutshell
ER models are graphical representations that visualize data structures through entities, their attributes, and the relationships between them. They form the foundation for database design.
Core Definition
Entity-Relationship models (ER models) were developed by Peter Chen to conceptually model data structures. They consist of three main components: entities (real-world objects), attributes (properties of entities), and relationships (connections between entities). Relationships carry cardinalities that describe how many instances can be connected (1:1, 1:n, n:m). The most common notations are Chen notation and Crow’s Foot notation. ER models serve as a blueprint for building relational databases, helping eliminate redundancy and maintain data integrity.
Exam Essentials
- Entities: Real or abstract objects with unique identification
- Attributes: Properties of entities, primary and foreign keys
- Relationships: Connections between entities with cardinalities
- Cardinalities: 1:1 (one-to-one), 1:n (one-to-many), n:m (many-to-many)
- Chen notation: Rectangles for entities, diamonds for relationships, ovals for attributes
- Crow’s Foot: Practical notation using lines and symbols to express cardinalities
- Mapping: Transformation of ER models into relational schemas
- IHK relevant: Must be able to interpret and create ER models
Key Components
- Entity types and entity instances
- Attributes (simple, composite, derived, multivalued)
- Primary keys and foreign keys
- Relationship types and relationship instances
- Cardinalities and participation constraints
- Weak entities and identifying relationships
- Generalization and specialization (inheritance)
- Aggregation and composition
- Chen notation versus Crow’s Foot
- Mapping to relational tables
Practical Example
// ER model Library (simplified)
ENTITY: Book
- ISBN (Primary Key)
- Title
- Author
- Year
ENTITY: Customer
- CustomerID (Primary Key)
- Name
- Address
RELATIONSHIP: borrows (1:n)
- One customer can borrow many books
- One book can be borrowed by one customer
Mapping:
- Table Book(ISBN, Title, Author, Year, CustomerID_FK)
- Table Customer(CustomerID, Name, Address)
- Foreign key CustomerID_FK in Book table
Strengths and Weaknesses
Strengths
- Visual representation aids understanding
- Early detection of design issues
- Standardized notations for communication
- Solid foundation for database implementation
Weaknesses
- Complex models can become difficult to read
- Different notations may cause confusion
- Abstraction can obscure important details
- Requires experience to model effectively
Common Exam Questions (with Short Answers)
-
What are the three main components of ER models? Entities, attributes, relationships.
-
What’s the difference between a 1:n and n:m relationship? In a 1:n relationship, one record on one side can relate to many on the other, but not vice versa. In an n:m relationship, records on both sides can relate to many on the other side.
-
What symbols are used in Chen notation? Rectangles for entities, diamonds for relationships, ovals for attributes.
-
How is a 1:n relationship shown in Crow’s Foot notation? A line with a “foot” (crow’s foot symbol) on the n side, and a straight line on the 1 side.
-
Primary key versus foreign key? A primary key uniquely identifies a record; a foreign key references the primary key of another table.
-
What is a weak entity? An entity that cannot exist independently of another entity; it is identified through a foreign key.
-
How is an n:m relationship mapped to tables? It creates a separate junction table containing foreign keys to both related entities.
-
What is generalization in ER models? A hierarchical relationship where specialized entities inherit from a general entity (IS-A relationship).
Key Resources
- https://de.wikipedia.org/wiki/Entity-Relationship-Modell
- https://www.guru99.com/er-diagram-tutorial.html
- https://www.lucidchart.com/pages/de/er-diagramme
Recommended Reading: Databases
Keine Bücher für Kategorie "datenbanken" gefunden.
More ER Model Articles
Entity-Relationship models are fundamental to database design. The following articles will help you master all aspects of ER models.
Fundamentals and Relationships
- ER Models: Entity Relationship Diagrams - Detailed explanation of relationship types and cardinalities



