1 / 28

Prepared by K.Padmaja , Lecturer in CME K.Subrahmanyam , Lecturer in CME

e – Lesson Module for C-16 Curriculum. State Board of Technical Education & Training Andhra Pradesh. Year/Semester : III Semester Branch : Computer Engineering Subject : CM-305, DBMS Topic : Concepts of DBMS & RDBMS Sub Topic : Explain Mapping Constraints Duration : 50 min.

tpurvis
Télécharger la présentation

Prepared by K.Padmaja , Lecturer in CME K.Subrahmanyam , Lecturer in CME

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. e – Lesson Module for C-16 Curriculum State Board of Technical Education & Training Andhra Pradesh Year/Semester : III Semester Branch : Computer Engineering Subject : CM-305,DBMS Topic : Concepts of DBMS & RDBMS Sub Topic : Explain Mapping Constraints Duration : 50 min Prepared by K.Padmaja, Lecturer in CME K.Subrahmanyam, Lecturer in CME At A.A.N.M&V.V.R.S.R POLYTECHNIC , GUDLAVALLERU C_16_CME_305_1.15

  2. Main objectives of this lesson On completion of this period, you would be able to • Know about Mapping constraints C_16_CME_305_1.15

  3. RECAP In the previous lesson, you have learnt • About super key • About candidate key • About primary key C_16_CME_305_1.15

  4. Super key: A super key is either a single or a combination of attributes that can be used to uniquely identify a database record. A table might have many combinations that create super keys. Candidate key: A candidate key is a combination of attributes that can be uniquely used to identify a database record without referring to any other data. Primary key: Primary key is one/more columns in a table used to uniquely identify each row in a table C_16_CME_305_1.15

  5. Do you know what is meant by mapping? • A mathematical relation such that each element of a given set is associated with an element of another set C_16_CME_305_1.15

  6. What is constraint? • A constraint is a restriction on the degree of freedom you have in proceeding a solution C_16_CME_305_1.15

  7. Mapping Constraints • An entity relationship enterprise schema can define certain constraints called mapping constraints • The most important types of mapping constraints are • Mapping Cardinalities • Existence dependencies C_16_CME_305_1.15

  8. Mapping Cardinalities • Mapping cardinalities are most useful for describing binary relationship-sets which involve two entity sets • Mapping cardinalities express the number of entities to which another entity can be associated via a relationship set C_16_CME_305_1.15

  9. The mapping cardinality can be one of the following • One to one • One to Many • Many to One • Many to Many C_16_CME_305_1.15

  10. 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 • E.g:- Husband-----------Wife Student-------------Pin no C_16_CME_305_1.15

  11. One to One A B a1 b1 b2 a2 b3 a3 b4 a4 C_16_CME_305_1.15

  12. One to Many • An entity in A is associated with any number of entities in B.However an entity in B can be associated with at most one entity in A • E.g:- Father------------Children Class--------------Students C_16_CME_305_1.15

  13. One to Many A B b1 a1 b2 a2 b3 a3 b4 b5 C_16_CME_305_1.15

  14. Many to One • An entity in A is associated with at most one entity in B • An entity in B can be associated with any number of entities in A • E.g:- Goods---------------Vendor Books-----------------Publisher C_16_CME_305_1.15

  15. Many to one A B a1 b1 a2 b2 a3 a4 b3 a5 C_16_CME_305_1.15

  16. Many to Many • An entity in A is associated with any number of entities in B and an entity in B is associated with any number of entities in A • E.g:- Students---------Hobbies C_16_CME_305_1.15

  17. Many to Many A B a1 b1 b2 a2 b3 a3 b4 a4 C_16_CME_305_1.15

  18. Existence Dependencies • If the existence of an entity A depends on the existence of entity B, then A is said to be existence dependent on B • If B is deleted then A is also deleted and thus entity B is said to be a dominant entity and A is said to be a subordinate entity C_16_CME_305_1.15

  19. Summary We have discussed • Various Mapping Cardinalities • Existence Dependencies C_16_CME_305_1.15

  20. Assignment questions 1) Explain about mapping constraints? C_16_CME_305_1.15

  21. Quiz C_16_CME_305_1.15

  22. How many types of mapping cardinalities are there in Mapping Constraints? • Three • Four • Five C_16_CME_305_1.15

  23. How many types of mapping cardinalities are there in Mapping Constraints? • Three • Four • Five C_16_CME_305_1.15

  24. 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 is called • One to many • Many to Many • One to One C_16_CME_305_1.15

  25. 2. 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 is called • One to many • Many to Many • One to One C_16_CME_305_1.15

  26. 3. If the existence of entity A depends on the existence of entity B, then A is said to be • Existence dependent on B • Existence dependent on A • Existence dependent on C C_16_CME_305_1.15

  27. 3. If the existence of entity A depends on the existence of entity B, then A is said to be • Existence dependent on B • Existence dependent on A • Existence dependent on C C_16_CME_305_1.15

  28. Thank you C_16_CME_305_1.15

More Related