Hello! In our last lesson, we developed a method for identifying relationships between entities by analyzing business descriptions. We learned to think of entities as the "nouns" and relationships as the "verbs" that connect them.
Now that we know how to find these connections, our next step is to classify them. This lesson focuses on the cardinality of a relationship, which defines the numerical rules governing it. By the end of our session, you'll be able to distinguish between the three fundamental types of relationships: one-to-one (1:1), one-to-many (1:M), and many-to-many (M:N). This skill is essential for accurately modeling business rules and drawing correct Entity-Relationship Diagrams (ERDs).
1. What is Relationship Cardinality?
In the previous lesson, we identified a relationship like "a CUSTOMER places an ORDER". But this description is incomplete. To build a functional database, we need to ask more specific questions:
- How many orders can a single customer place? One? Many?
- How many customers can be associated with a single order? Just one? Or could an order be shared by multiple customers?
These questions are about the cardinality of the relationship. Cardinality defines the minimum and maximum number of instances of one entity that can be related to instances of another entity. Getting this right is crucial, as a mistake can lead to a database that doesn't correctly reflect the real-world rules it's supposed to model.
The following video introduces why thinking about "how many" is a vital part of the database design process.
This video from the Decomplexify channel explains the importance of defining the cardinality of relationships.
Watch the segment from the start of the discussion on relationships up to the end of the cardinality decisions. Focus on the questions the presenter asks about the "pet ownership" scenario. This illustrates the thought process required to define business rules precisely.
2. The Three Fundamental Relationship Types
When we focus on the maximum number of associations between entities, three primary types of relationships emerge. The image below provides a quick visual summary using simple examples.

To understand these properly, we determine the cardinality by reading the relationship in both directions. Let's examine each type in detail.
This article from Metabase Learn provides clear definitions and examples for each relationship type.
Read the sections titled One-to-one relationship, One-to-many relationship, and Many-to-many relationship. As you read, focus on: The definition of each relationship type. The example provided (e.g., Employee-Computer, Customer-Order). How the relationship is determined by asking "how many?" from both directions.
Let's summarize what you just read:
a) One-to-One (1:1) Relationship
- Definition: A single record in Table A is related to at most one record in Table B, and a single record in Table B is related to at most one record in Table A.
- Example: An
EMPLOYEEis assigned exactly one companyCOMPUTER, and a companyCOMPUTERis assigned to exactly oneEMPLOYEE. - How to read it:
- From
EMPLOYEEtoCOMPUTER: One employee is assigned one computer. - From
COMPUTERtoEMPLOYEE: One computer is assigned to one employee.
- From
- Note: This is the least common relationship type. Often, the information could be combined into a single table unless there's a specific reason to separate it (like security or organization).
b) One-to-Many (1:M) Relationship
- Definition: A single record in Table A can be related to many records in Table B, but a single record in Table B can only be related to one record in Table A.
- Example: A
CUSTOMERcan place manyORDERs, but eachORDERbelongs to only oneCUSTOMER. - How to read it:
- From
CUSTOMERtoORDER: One customer can have many orders. - From
ORDERtoCUSTOMER: One order belongs to one customer.
- From
- Note: This is the most common and fundamental relationship type in relational databases.
c) Many-to-Many (M:N) Relationship
- Definition: A single record in Table A can be related to many records in Table B, and a single record in Table B can also be related to many records in Table A.
- Example: A
STUDENTcan enroll in manyCOURSEs, and aCOURSEcan have manySTUDENTs enrolled. - How to read it:
- From
STUDENTtoCOURSE: One student can enroll in many courses. - From
COURSEtoSTUDENT: One course can have many students.
- From
- Important Preview: As the article mentioned, relational databases cannot directly implement M:N relationships. They must be broken down into two 1:M relationships using a third table, often called a join table or composite entity. We will cover exactly how to do this in Module 6. For now, the key is to be able to identify an M:N relationship from the business rules.
The next video provides a concise summary of these three types using the standard "Crow's Foot" notation you'll be using to draw ERDs.
Let's return to the "Entity Relationship Diagrams" video to see a clear visual summary.
Watch this short segment that explains the three basic kinds of relationships. Pay attention to how the "crow's foot" symbol represents the "many" side of a relationship.
3. More Examples in Action
Let's solidify your understanding with a few more practical examples. The following video walks through several scenarios, explicitly stating the business rules and then identifying the relationship type.
ERD: Relationship Cardinalities
This video from Dustin Ormond provides quick, clear examples of binary relationships.
Watch the following three short segments: Binary one-to-one: The Employee and Parking Space example. Binary one-to-many: The Product Line and Product example. Binary many-to-many: The Student and Course example. Notice how in each case, the relationship is read from both directions to determine the cardinality. You'll also see symbols for "optional" (a circle) vs. "mandatory" (a line). We will explore that concept in detail in our very next lesson!
Conclusion
In this lesson, we moved from simply identifying relationships to classifying them based on their cardinality. Understanding the difference between one-to-one, one-to-many, and many-to-many relationships is a non-negotiable skill for correct database design. It allows you to translate complex business rules into a structured, logical model.
Key Takeaways:
- Cardinality defines the numerical rules of a relationship, answering "how many?".
- There are three fundamental relationship types determined by the maximum cardinality:
- One-to-One (1:1): One instance is related to at most one other instance (e.g.,
Managermanages oneDepartment). - One-to-Many (1:M): One instance is related to many other instances (e.g.,
Departmenthas manyEmployees). This is the most common type. - Many-to-Many (M:N): An instance on either side can be related to many instances on the other side (e.g.,
Studentenrolls in manyCourses).
- One-to-One (1:1): One instance is related to at most one other instance (e.g.,
- To determine the relationship type, you must analyze the business rules and read the relationship from both directions.
So far, we've focused on the maximum number of connections. In our next lesson, we will add another layer of precision by defining the minimum number. This is known as participation, and it determines whether a relationship is mandatory or optional.