Transformation of ERMs into Relational Schemas<br />
Initial Situation<br />Initial Situation: 3 Entity Types A, B und C<br />
Transformation Rules ERM  Tables<br />Transformation Rules<br />Describethetransformationfrom ERM modelsintorelations (ta...
(1,1)-(x,n)-Relation (x=0 v x=1)<br />
(0,1)-(x,n)-Relation (x=0 v x=1)<br />
(0,1)-(x,n)-Relation (x=0 v x=1)<br />
(0,1)-(0,1)-Relation<br />
(0,1)-(0,1)-Relation<br />
(1,1)-(1,1)-Relation<br />Note: Itisnecessarytohave a triggerfornewentriesthatenforces an entry in thesecondrelation, as w...
(1,1)-(1,1)-Relation<br />Avoid (1,1)-(1,1) relations<br />Better: Modelling as attributes<br />
(0,1)-(1,1)-Relation<br />
Remark: (1,x)-Relations (x={1,..,n})<br />Example: (1,n)-(0,n)-Relations<br />
Remark: (1,x)-Relation (x={1,..,n})<br />Example: (1,n)-(0,n)-Relation<br />
Remark: (1,x)-Relation (x={1,..,n})<br />Example: (1,n)-(0,n)-Relation<br />
Generalization/Specialization<br />How will Generalization/Specialization be modelled in Relations, meaning in Tables? <br />
Generalization/Specialization (N,P)<br />
Generalization/Specialization (N,T)<br />Tosomeextend<br />
Generalization/Specialization (D,P)<br />Tosomeextend<br />
Generalization/Specialization (D,T)<br />Tosomeextend<br />
Triple Relationship Type<br />Entries are arbitrary, as long as they are unique entries in A, B, and C.<br />
Reinterpreted Relationship Type (1/2)<br />New entries not arbitrary. Theyaredependenton alreadyexistingentries in AB!<br />
Reinterpreted Relationship Type (2/2)<br />Entries not arbitrary, because #C is Foreign Key<br />
Transformation of ERMs into Relational Schemas<br />
Upcoming SlideShare
Loading in...5
×

05 Transformation

455

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
455
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

05 Transformation

  1. 1. Transformation of ERMs into Relational Schemas<br />
  2. 2. Initial Situation<br />Initial Situation: 3 Entity Types A, B und C<br />
  3. 3. Transformation Rules ERM  Tables<br />Transformation Rules<br />Describethetransformationfrom ERM modelsintorelations (tables)<br />Are not alwaysunambiguous<br />Simple Example: (x,n)-(x,n)-Relation (x=0 v x=1)<br />
  4. 4. (1,1)-(x,n)-Relation (x=0 v x=1)<br />
  5. 5. (0,1)-(x,n)-Relation (x=0 v x=1)<br />
  6. 6. (0,1)-(x,n)-Relation (x=0 v x=1)<br />
  7. 7. (0,1)-(0,1)-Relation<br />
  8. 8. (0,1)-(0,1)-Relation<br />
  9. 9. (1,1)-(1,1)-Relation<br />Note: Itisnecessarytohave a triggerfornewentriesthatenforces an entry in thesecondrelation, as well. <br />
  10. 10. (1,1)-(1,1)-Relation<br />Avoid (1,1)-(1,1) relations<br />Better: Modelling as attributes<br />
  11. 11. (0,1)-(1,1)-Relation<br />
  12. 12. Remark: (1,x)-Relations (x={1,..,n})<br />Example: (1,n)-(0,n)-Relations<br />
  13. 13. Remark: (1,x)-Relation (x={1,..,n})<br />Example: (1,n)-(0,n)-Relation<br />
  14. 14. Remark: (1,x)-Relation (x={1,..,n})<br />Example: (1,n)-(0,n)-Relation<br />
  15. 15. Generalization/Specialization<br />How will Generalization/Specialization be modelled in Relations, meaning in Tables? <br />
  16. 16. Generalization/Specialization (N,P)<br />
  17. 17. Generalization/Specialization (N,T)<br />Tosomeextend<br />
  18. 18. Generalization/Specialization (D,P)<br />Tosomeextend<br />
  19. 19. Generalization/Specialization (D,T)<br />Tosomeextend<br />
  20. 20. Triple Relationship Type<br />Entries are arbitrary, as long as they are unique entries in A, B, and C.<br />
  21. 21. Reinterpreted Relationship Type (1/2)<br />New entries not arbitrary. Theyaredependenton alreadyexistingentries in AB!<br />
  22. 22. Reinterpreted Relationship Type (2/2)<br />Entries not arbitrary, because #C is Foreign Key<br />
  23. 23. Transformation of ERMs into Relational Schemas<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×