
- DBMS Tutorial
- DBMS - Home
- DBMS - Overview
- DBMS - Architecture
- DBMS - Data Models
- DBMS - Data Schemas
- DBMS - Data Independence
- Entity Relationship Model
- DBMS - ER Model Basic Concepts
- DBMS - ER Diagram Representation
- DBMS - Generalization, Aggregation
- Relational Model
- DBMS - Codd's Rules
- DBMS - Relational Data Model
- DBMS - Relational Algebra
- DBMS - ER to Relational Model
- DBMS- SQL Overview
- Relational Database Design
- DBMS - Database Normalization
- DBMS - Database Joins
- Storage and File Structure
- DBMS - Storage System
- DBMS - File Structure
- Indexing and Hashing
- DBMS - Indexing
- DBMS - Hashing
- Transaction And Concurrency
- DBMS - Transaction
- DBMS - Concurrency Control
- DBMS - Deadlock
- Backup and Recovery
- DBMS - Data Backup
- DBMS - Data Recovery
- DBMS Useful Resources
- DBMS - Quick Guide
- DBMS - Useful Resources
- DBMS - Discussion
Explain the cardinality concept in DBMS?
In the view of databases, cardinality refers to the uniqueness of data values that are contained in a column. High cardinality is nothing but the column contains a large percentage of totally unique values. Low cardinality is nothing but the column which has a lot of “repeats” in its data range.
Cardinality between the tables can be of type one-to-one, many-to-one or many-to-many.
Mapping Cardinality
It is expressed as the number of entities to which another entity can be associated via a relationship set.
For binary relationship set there are entity set A and B then the mapping cardinality can be one of the following −
One-to-one
One-to-many
Many-to-one
Many-to-many
One-to-one relationship
One entity of A is associated with one entity of B.
Example
Given below is an example of the one-to-one relationship in the mapping cardinality. Here, one department has one head of the department (HOD).
One-to-many relationship
An entity set A is associated with any number of entities in B with a possibility of zero and entity in B is associated with at most one entity in A
Example
Given below is an example of the one-to-many relationship in the mapping cardinality. Here, one department has many faculties.
Many-to-one relationship
An entity set A is associated with at most one entity in B and an entity set in B can be associated with any number of entities in A with a possibility of zero.
Example
Given below is an example of the many-to-one relationship in the mapping cardinality. Here, many faculties work in one department.
Many-to-many relationship
Many entities of A are associated with many entities of B.
An entity in A is associated with many entities of B and an entity in B is associated with many entities of A.
Many to many=many to one + one to many
Example
Given below is an example of the many-to-many relationship in the mapping cardinality. Here, many employees work on many projects.
- Related Articles
- Explain the concept of Normalization in DBMS?
- Explain the concept of recoverability in DBMS
- Explain the concept of indexing in DBMS
- Explain the concept of secondary index in DBMS
- Explain the concept of DBMS schema with examples?
- Explain the concept of the traditional file system in DBMS?
- Explain the concept of foreign keys with examples(DBMS)?
- Explain the concept of key attributes with an example in DBMS?
- Explain the concept of primary key with an example (DBMS)?
- Explain the concept of magnetic disk with the help of a diagram(DBMS)
- Explain the concept of amalgamation
- Explain the logical operators in DBMS
- Explain the Network Model in DBMS?
- Explain the Relational Model in DBMS?
- Explain the relational algebra in DBMS?
