.

Cardinality and participation explained for E-R diagrams.

- How to show cardinality/participation for several methodologies.
- Examples of notation and diagrams.

In my previous posts, I discussed some E-R diagram basics and some common mistakes to avoid. In this post, I’ll cover cardinality and participation. **Cardinality** is a count of the number of times one entity can (or must) be associated with each occurrence of another entity. **Participation** refers to whether an entity *must* participate in a relationship with another entity to exist.

In general, **cardinality** tells you "How many". Cardinality can be:

- One to one (1:1): every time one entity occurs, there is exactly one occurrence of another entity.
- One to many (1:m): every time one entity occurs, there are multiple occurrences of another entity.
- Many to many (m:m): for each occurrence of an entity, there can be one or many occurrences of another—an vice versa.

In some notations, a cardinality constraint corresponds to maximum cardinality. In other notations, cardinality may be combined with participation (a "minimum").

**Participation** can be total or partial (optional):

**Total participation**is where an entity must participate in a relationship to exist. For example, an employee must work for at least one department to exist as an “employee”.**Partial (optional) participation**is where the entity can exist without participating in a relationship with another entity [1]. For example, the entity “course” may exist within an organization, even though it has no current students.

While there are many ways to create E-R diagrams, a straightforward way is to create a rough draft of your ERD first, then tackle cardinality. While most methodologies (e.g., Chen, I.E, min/max) use the same shapes for entities (rectangles) and relationships (diamonds), when it comes to cardinality each has its own specific notation. This is where you must make a choice about what methodology to use, as you must stay consistent when building cardinality constraints.

One of the most important choices is between *Look-Here* and *Look-Across* methods. **Look-Here** and **Look-Across** refers to *where* the cardinality and participation constraints are specified in ER diagrams.

With the “Look-Here” cardinality constraint, you’re literally looking “here” (i.e. next to) the entity to determine cardinality.

In the above example using the min/max method, the upper bound cardinality constraint 1 states that each employee may have the relationship “work for” at most 1 time, meaning they can only work for one department. The lower bound cardinality constraint 1 states that each employee must have at least 1 appearance in the “works for” relationship. On the other hand, there are no restrictions on how many employees a department may have; the upper bound N indicated no limit [2].

With the “Look-Across” constraint, you must look to the other side of the relationship to garner meaning:

**Different Methodologies and Ways to Show Cardinality**

The following examples all show how different methodologies show cardinality and participation:

Crowsfeet is one of the most popular methods for creating E-R diagrams. With crowsfeet notation, cardinality is represented by decorations on the ends of lines.

A **cardinality of one** is represented by a straight line perpendicular to the relationship line.

────┼

A cardinality of many is usually represented by the three-pronged 'crow-foot' symbol, but may also be represented by a two-pronged symbol [2]:

────< **many**

Other basic symbols:

───┼< **one or many**

──o─< **zero or many**

───┼┼ **exactly one.**

The IE method is very similar to crowsfeet but does not show attributes related to a relationship: the relationship is depicted as a named line between two entities. Cardinality and participation constraints are combined into min/max (bar and crowfoot) notation. Cardinality is shown as follows [1]:

**One and only one:**Two bars at end of line or single bar**Zero or one**: Hollow dot and one bar**One or more**: One bar and crowfoot**Zero, one or more:**Hollow dot and crowfoot**More than one:**Crowfoot.

Your choice of which methodology to use is probably going to be determined by your company's preference (or perhaps your instructor's). Unfortunately, differences between notations make the diagrams challenging to transfer from one format to another [1].

**References**

Images: By Author

© 2021 TechTarget, Inc. Powered by

Badges | Report an Issue | Privacy Policy | Terms of Service

**Most Popular Content on DSC**

To not miss this type of content in the future, subscribe to our newsletter.

- Book: Applied Stochastic Processes
- Long-range Correlations in Time Series: Modeling, Testing, Case Study
- How to Automatically Determine the Number of Clusters in your Data
- New Machine Learning Cheat Sheet | Old one
- Confidence Intervals Without Pain - With Resampling
- Advanced Machine Learning with Basic Excel
- New Perspectives on Statistical Distributions and Deep Learning
- Fascinating New Results in the Theory of Randomness
- Fast Combinatorial Feature Selection

**Other popular resources**

- Comprehensive Repository of Data Science and ML Resources
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- 100 Data Science Interview Questions and Answers
- Cheat Sheets | Curated Articles | Search | Jobs | Courses
- Post a Blog | Forum Questions | Books | Salaries | News

**Archives:** 2008-2014 |
2015-2016 |
2017-2019 |
Book 1 |
Book 2 |
More

**Most popular articles**

- Free Book and Resources for DSC Members
- New Perspectives on Statistical Distributions and Deep Learning
- Time series, Growth Modeling and Data Science Wizardy
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- Comprehensive Repository of Data Science and ML Resources
- Advanced Machine Learning with Basic Excel
- Difference between ML, Data Science, AI, Deep Learning, and Statistics
- Selected Business Analytics, Data Science and ML articles
- How to Automatically Determine the Number of Clusters in your Data
- Fascinating New Results in the Theory of Randomness
- Hire a Data Scientist | Search DSC | Find a Job
- Post a Blog | Forum Questions

## You need to be a member of Data Science Central to add comments!

Join Data Science Central