Please login

Prime

Prepinsta Prime

Video courses for company/skill based Preparation

(Check all courses)
Get Prime Video
Prime

Prepinsta Prime

Purchase mock tests for company/skill building

(Check all mocks)
Get Prime mock

Mapping Constraints in DBMS

Mapping constraints in DBMS 

 

In this article, we will learn about Mapping constraints in DBMS.

Mapping constraints defines how many entities can be related to another entity to a relationship. It is very much useful for identifying relationships that are involved with more than one relationship

  • Simple binary relationship with two entity sets then 4 possible mapping cardinalities to exist as follows 
    • One to one (1:1)
    • One to many (1:M)
    • Many to one (M:1)
    • Many to Many (M M)

One to one cardinality

  • When a single instance of an entity is associated with a single instance of another entity, then it is called as one to one cardinality
  • Here each entity of the entity set participate only once in the relationship

Example for one to one cardinality

Assume that the only male can be married to only one female and one female can be married to only one male, this  can be viewed as one to one  cardinality

One to One Relationship Cardinality in DBMS

One-to-Many  cardinality

  • When is a single instance of an entity is associated with more than one instance of another entity then this type of relationship is called one to many relationships
  • Here entities in one entity set can take participation in  any number of times in relationships set and entities in another entity set can take participation only once in a relationship set

Example for one to many cardinalities

 For example in the Real world, many students can study in a single college but the student cannot apply to more than one college at the same time

One to Many Relationship Cardinality in DBMS

Many-to-one cardinality

When entities in one entity set can participate only once in a relationship set and entities in another entity can participate more than once in the relationship set,  then such type of cardinality is called many-to-one

Example for many to one cardinality

  • In real time a student takes only one course but a single course can be taken by any number of students. so many to  one relationship is observed here
  • It means that one course can be taken by any number of students but only one course can be allotted to one student 
Many to One Relationship Cardinality in DBMS

Many-to-many cardinality

  • Here  more than one instance of an entity is associated with more than one instance of another entity then it is called many to many relationships
  • In this cardinality, entities in all entity sets can take participate any number of times in the relationship cardinality is many to many.

Example for many to many cardinality

In the Real world assume that a student can take more than one course and the single course can be taken by any number of students this  relationship will be many to many relationship

Many to Many Cardinality in DBMS
Summary
Review Date
Reviewed Item
Mapping Constraints in DBMS
Author Rating
51star1star1star1star1star