Mapping Constraints in DBMS

Posted By on September 30, 2014


Download PDF
Attributes in DBMS
keys in DBMS

Mapping Constraints

An E-R scheme may define certain constraints to which the contents of a database must conform.

  • Mapping Cardinalities: express the number of entities to which another entity can be associated via a relationship. For binary relationship sets between entity sets A and B, the mapping cardinality must be one of:
    1. One-to-one: An entity in A is associated with at most one entity in B, and an entity in B is associated with at most one entity in A.
    2. One-to-many: An entity in A is associated with any number in B. An entity in B is associated with at most one entity in A.
    3. Many-to-one: An entity in A is associated with at most one entity in B. An entity in B is associated with any number in A.
    4. Many-to-many: Entities in A and B are associated with any number from each other. (Figure 2.6)

    The appropriate mapping cardinality for a particular relationship set depends on the real world being modeled. (Think about the CustAcct relationship…)

  • Existence Dependencies: if the existence of entity X depends on the existence of entity Y, then X is said to be existence dependent on Y. (Or we say that Y is the dominant entity and X is the subordinateentity.)For example,
    • Consider account and transaction entity sets, and a relationship log between them.
    • This is one-to-many from account to transaction.
    • If an account entity is deleted, its associated transaction entities must also be deleted.
    • Thus account is dominant and transaction is subordinate.

 

Attributes in DBMS
keys in DBMS

Download PDF

Posted by Akash Kurup

Founder and C.E.O, World4Engineers Educationist and Entrepreneur by passion. Orator and blogger by hobby

Website: http://world4engineers.com