

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 Questions & Answers
- 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 primary key with an example (DBMS)?
- Explain the concept of key attributes with an example in DBMS?
- Explain the concept of magnetic disk with the help of a diagram(DBMS)
- Explain the concept of amalgamation
- Explain the concept of Regular expression.
- Explain the concept of trial balance
- Explain the concept of depreciation in accounting.
- Explain the concept of depletion in accounting.