EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login

Mapping Constraints in DBMS

Secondary Sidebar
DBMS Tutorial
  • DBMS
    • What is DBMS?
    • Introduction To DBMS
    • DBMS ER Diagram
    • DBMS_RANDOM
    • DBMS_XPLAN
    • DBMS join
    • DBMS Functions
    • Data Administrator in DBMS
    • Checkpoint in DBMS
    • DBMS Table
    • Mapping Constraints in DBMS
    • DBMS Canonical Cover
    • DBMS Log-Based Recovery
    • DBMS Multivalued Dependency
    • View Serializability in DBMS
    • DBMS Concepts
    • DBMS Constraints
    • DBMS_Scheduler
    • B+ Tree in DBMS
    • DBMS_LOB
    • dbms entity
    • DBMS Foreign Key
    • DBMS Users
    • DBMS_Metadata.get_ddl
    • Relational Algebra in DBMS
    • DBMS Components
    • DBMS Features
    • DBMS Models
    • DBMS Relational Model
    • Hashing in DBMS
    • DBMS network model
    • Relationship in DBMS
    • ER Model in DBMS
    • Data Models in DBMS
    • Static Hashing in DBMS
    • Advantages of DBMS
    • dbms_output.put_line
    • DBMS Data Dictionary
    • dbms_xplan.display_cursor
    • Normal Forms in DBMS
    • DBMS helps achieve
    • DBMS 3 tier Architecture
    • Relational Calculus in DBMS
    • Serializability in DBMS
    • File Organization in DBMS
    • DBMS Transaction Processing
    • States of Transaction in DBMS
    • Functional Dependency in DBMS
    • Generalization in DBMS
    • Data Independence in DBMS
    • Lock Based Protocols in DBMS
    • Deadlock in DBMS
    • Integrity Constraints in DBMS
    • Concurrency Control in DBMS
    • Validation Based Protocol in DBMS
    • DBMS Locks
    • Normalization in DBMS
    • Transaction Property in DBMS
    • Specialization in DBMS
    • Aggregation in DBMS
    • Types of DBMS
Home Data Science Data Science Tutorials DBMS Tutorial Mapping Constraints in DBMS

Mapping Constraints in DBMS

Introduction to Mapping Constraints

In a Database Management System, Mapping constraints are implemented to determine the relationships between the entities. This is especially true when the system has a condition where one or more entities can be related to one or more entities in the same Entity-Relationship model. Mapping Constraints are greatly functional in recognizing the relationships between the Entities that involve more than one relationship for any given Entity. Mapping Constraints are also known as the ‘Cardinality Ratio.’ This corresponds to the number of relationship occurrences an entity can be involved in an Entity-Relationship Model. This procedure comes in handy while setting up relationships between the Binary sets. In this topic, we will learn about Mapping Constraints in DBMS.

Types of Mapping Constraints

An Entity-Relationship Model, with two sets of Entities that are considered Binary sets, can have the below four types of Mapping Constraints and their corresponding representations,

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

  • One to one (1:1)
  • One to many (1:M)
  • Many to one (M:1)
  • Many to Many (M M)

1. One to one Cardinality

When one object from an entity is connected with a single object from another entity of the same Entity-Relationship model, then the Mapping Constraint can be termed ‘One to One Cardinality.’ As the name suggests, it can have only one to one relationship. If there appears a need for involving more than one Entity object in the mapping, then the other cardinality types can be used. Here each entity object from the entity set contributes not more than once in the relationship.

One to one Cardinality

The above example (Fig. 01) shows the entity Employee and the entity Salary Account, with the relationship condition as salary. One employee working for any company can have only one Salary account. This applies to all employees, without any exception. Hence this Entity-relationship mapping falls under the one-to-one cardinality type.

All in One Data Science Bundle(360+ Courses, 50+ projects)
Python TutorialMachine LearningAWSArtificial Intelligence
TableauR ProgrammingPowerBIDeep Learning
Price
View Courses
360+ Online Courses | 50+ projects | 1500+ Hours | Verifiable Certificates | Lifetime Access
4.7 (85,938 ratings)

2. One to many Cardinality

When one object from an entity is connected with more than one object from the same entity of the same Entity-Relationship model, the Mapping Constraint can be termed ‘One to Many Cardinality.’ As the name suggests, it can have only one to many relationships. If there appears to be a need for involving more than one entity on the left side of the mapping or for only one entity object on the right side, then the other cardinality types can be used. Here one entity object from the left entity set contributes to more than one entity object in the right entity set as the mapping relationship.

One to many Cardinality

The above example (Fig. 02) shows the entity Employee and the entity Sales, with the relationship condition as Job. An employee working for a company can make more than one sale. But not more than one employee can make the same sale. This applies to all employees and sales, without any exception. Hence this Entity-relationship mapping falls under the one-to-many cardinality types.

3. Many to one Cardinality

When many objects from an entity are connected with only one object from the other entity of the same Entity-Relationship model, the Mapping Constraint can be termed ‘Many to one Cardinality.’ As the name suggests, it can have many to-one mapping relationships. If there appears to be a need for involving only one entity on the left side of the mapping or for more than one entity object on the right side, then the other cardinality types can be used. Here many entity objects from the left entity set contribute to only one entity object in the right entity set as the mapping relationship.

Many to one Cardinality

The above example (Fig. 03) shows the entity Employee and the entity Sales, with the relationship condition as Job. Many Employees working for a company can report to one Manager. But not one employee can be reporting to more than one Manager. This applies to all employees, managers, and reporting, without any exception. Hence this Entity-relationship mapping falls under the many to one cardinality type.

4. Many to many Cardinality

When many objects from an entity are connected with more than one object from the other entity of the same Entity-Relationship model, the Mapping Constraint can be termed ‘Many to Many Cardinality.’ As the name suggests, it can have many, many mapping relationships. If there appears a need for involving only one entity on the left side of the mapping or for only one entity object on the right side of the mapping, then the other cardinality types can be used. Here more than one entity object from the left entity set contributes to more than one entity object in the right entity set as the mapping relationship.

Mapping Constraints in DBMS

The above example (Fig. 04) shows the entity Employee and the customer, with the relationship condition as sales. Many Employees working for a company can be making sales to many customers. There is no condition for one employee to make sales with only one customer or for one customer to buy the sale from only one employee. This applies to all employees, sales, and customers, without any exception. Hence this Entity-relationship mapping falls under the many to many cardinality types.

Significance of Mapping Constraints

Mapping Constraints for the Entity-Relationship Model is an important concept for efficiently designing the Database Management System. Below are the few most important reasons for following Mapping Constraints,

  • Mapping Cardinality helps describe the relationship between two entity tables in the DBMS by articulating the number of entity instances linked with the instances of the related entities.
  • There should be at least one entity object from both the related entity sets to establish mapping constraints between the corresponding entities.
  • Mapping Constraints facilitate the DBMS to be well-organized and well-structured, which helps maintain clean data in the tables.
  • This also reduces redundancy and no duplication in data, as the mapping does not allow any slippage in data in the tables of the respective entity objects.

Conclusion

Usually, Mapping Constraints in DBMS are derived from the Business policies provided as a requirement in the project. These are used to decide the cardinality types and the connectivity between the entity objects. This is most commonly used in relational databases and multidimensional database management systems. Therefore, it is necessary for the Database Architecture process while crafting the Database Management Systems.

Recommended Articles

This is a guide to Mapping Constraints in DBMS. Here we discuss the Types of Mapping Constraints along with their Significance. You may also have a look at the following articles to learn more –

  1. Types of DBMS
  2. Hashing in DBMS
  3. Functional Dependency in DBMS
  4. DBMS Keys
Popular Course in this category
SQL Training Program (7 Courses, 8+ Projects)
  7 Online Courses |  8 Hands-on Projects |  73+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Data Science Course

SPSS, Data visualization with Python, Matplotlib Library, Seaborn Package

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

Special Offer - SQL Training Program (7 Courses, 8+ Projects) Learn More