Mapping cardinality in ER Model

mapping cardinalities is special type of constraints which will decide the total number of entities of two entity set participated in any relationship. It plays an important role in binary relationship. Let, r is binary relationship, which is placed between a and b entity set then mapping cardinalities are as follows - 

1. One-to-one :- if one entity of a entity set is related to one entity set and wise versa then this type of mapping cardinality is called one-to-one (1:1).
Example :- a. Vehicle and driver relationship.
  b. Principal and college relationship.
  c. State and cm relationship.

2. One-to-many :- if one entity of a entity set is related to many entity sets and one entity of b entity set is related to one entity of a entity set only then this type of entity set is called one-to-many.
Example :- a. Principal and students.
  b. Parent and children.
  c. Organization and employees.

3. Many-to-one :- if an entity of a entity set is related with only one entity of b entity set and an entity of b entity set is related with two or more entities of a entity set then this type of mapping cardinalities is called many-to-one.
Example :- a. Students and principal.
  b. Children and parent.
  c. Employees and organization.

4. Many-to-many :- if many entity of a entity is related with many entity of b entity set and wise versa then it's called many-to-many.
Example :- a. Teachers and students.
     b. Products and customers.

No comments:

Post a Comment

Nested SQL Query or SQL Sub Query in hindi in english

if a SQL query is used inside another SQL query then this type of SQL query is called sub-query.  यदि किसी SQL क्वेरी का उपयोग, किसी अन्य SQ...