Cardinality defines the number of entities in one entity set that can be associated with entities in another entity set within a relationship. This is most useful in describing binary relationships (relationships between two entities).
There are four types of cardinalities:
1. One-to-One (1-1) Relationship
2. One-to-Many (1-M) Relationship
3. Many-to-One (M-1) Relationship
4. Many-to-Many (M-N) Relationship
One entity from entity set A can be associated with at most one entity from entity set B, and vice versa.
Example: A person has only one passport, and a passport is assigned to only one person.
One entity from entity set A can be associated with more than one entity from entity set B, but an entity from entity set B can be associated with at most one entity from entity set A.
Example: A customer can place many orders, but an order is placed by only one customer.
More than one entity from entity set A can be associated with at most one entity from entity set B, but an entity from entity set B can be associated with more than one entity from entity set A.
Example: Many students can study at a single college, but a student cannot study at multiple colleges at the same time.
One entity from entity set A can be associated with more than one entity from entity set B, and vice versa.
Example: An employee can be assigned to many projects, and a project can have many employees.