Saturday, June 20, 2020

Mapping Constraints in DBMS

Mapping Constraints

Mapping Constraints

Relationship type hence contain constraints that limits possible combination of entity/entities that corresponding relationship.

Cardinality (:) Ratio   

The coordinating ratio for a binary relationship specified the maximum number of relationships. Instances that an entity can participate in.

Types of Mapping

1. one to one (1 : 1)
2. one to many (1 : n)
3. many to one (m : 1)
4. many to many (m : n)

1) One to one (1 : 1)

The e.g. shows one to one (1:1) binary relationship manages which related a department entity to employee who manages that department. This represent that any point of type an employee can manage only ane department. Because an employee is a manager.




2) Many to many (m:n) 

Many to many (m:n) Is a key constraint that indicate that many of one entity can be associated with many of other entity.
e.g. – of (m:n) relationship is employee, and their hobbies. Its mean a person can have many different hobbies.

And their hobbies, it’s meant a person can have the same hobby.
The e.g. shows the relationship type works on it is of coordination ratio (m:n). because an employee can project can have a several employee.

3) one to many (1:n) 

One to many relationships is a key constraint that indicates that one entity can be associated with many of other entity.
For e.g. – of one to many relationships is when an employee can work for more than one department.

4) Many to one (m:1) 

Many to one relationship is key constraints that indicates that more than one entity can be associated with one entity.


NOTE: - How did you like this post, you must tell us through the comments. We are eagerly waiting for your comments. If you have any question or any suggestions, then tell us, we will publish it here within two or three days and definitely share the post.

No comments:

Post a Comment