Your SlideShare is downloading. ×
0
‫أكاديمية الحكومة اإللكترونية الفلسطينية‬        The Palestinian eGovernment Academy                         www.egovacade...
AboutThis tutorial is part of the PalGov project, funded by the TEMPUS IV program of theCommission of the European Communi...
© Copyright NotesEveryone is encouraged to use this material, or part of it, but should properlycite the project (logo and...
Tutorial Map                       Intended Learning Objectives                                                           ...
Session ILOsAfter completing this session students will be able to:   11a3: Explain and demonstrate the concepts of data i...
Conceptual Schema Design Steps1. From examples to elementary facts2. Draw fact types and apply population check3. Combine ...
Uniqueness ConstraintFor each state taken individually, each person has at most one weight.How can we record such informa...
Uniqueness on Unary Fact Types       Is their any problem with this schema?How can we prevent people from adding such redu...
Uniqueness on Unary Fact Types                              The uniqueness constraint                              ensures...
Uniqueness on Binary Fact Types Each Politician was born  in at most one Country    Each Politician heads   government of ...
Uniqueness on Binary Fact Types                    Means many to manyIt is possible that the same Politician visited more ...
Uniqueness on Binary Fact TypesWhat is unique here?                       PalGov © 2011   12
Uniqueness on Binary Fact TypesWhat is unique here?                       PalGov © 2011   13
Uniqueness on Binary Fact TypesThe four uniqueness constraint patterns for a binary fact type:                          No...
How to think about Uniqueness    Is the population significant?                                           Adding counterex...
Uniqueness on Binary Fact Types         Which is more realistic?                PalGov © 2011       16
Uniqueness on Ternary Fact TypesWhat are the uniqueness constraints?      Each (Person, Subject) combination is unique.   ...
Uniqueness on Ternary Fact TypesAllowed basic uniqueness constraints for a ternary fact type:                            P...
Uniqueness on Ternary Fact TypesWhat does this uniqueness mean?                PalGov © 2011       19
Uniqueness on Ternary Fact TypesAllowed uniqueness constraint combinations for a ternary fact type:                       ...
Uniqueness on Ternary Fact TypesWhich of these constraint patterns is illegal? Why?                                    ...
Example of Uniqueness on n-ary fact typesEach (a,c,d) combination occurs in at most one row.                    PalGov © 2...
Uniqueness with Nested Fact Types                          This constraint is particularly                          import...
What is the difference between these?        Explain the joins        Do we need uniqueness?                 PalGov © 20...
External Uniqueness constraintsWhat is missing?                             u                        PalGov © 2011      25
External Uniqueness constraintsThe meaning of the External Uniqueness Each (b,c) combination is paired with at most one a ...
Example with nest fact types               PalGov © 2011   27
Key Length Check                                    What is wrong?               Splits into                             E...
Key Length Check                             What is wrong?               Splits into             PalGov © 2011           ...
DiscussionSummarize what you learnt until now?Problems of uniqueness in your daily life?Compare the uniqueness constraint ...
References1. Information Modeling and Relational Databases: From   Conceptual Analysis to Logical Design, Terry Halpin (IS...
Upcoming SlideShare
Loading in...5
×

Pal gov.tutorial1.session3 1.uniquenessrules

285

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
285
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Pal gov.tutorial1.session3 1.uniquenessrules"

  1. 1. ‫أكاديمية الحكومة اإللكترونية الفلسطينية‬ The Palestinian eGovernment Academy www.egovacademy.psTutorial 1: Data and Business Process Modeling Session 3.1 Uniqueness Rules Prof. Mustafa Jarrar Sina Institute, University of Birzeit mjarrar@birzeit.edu www.jarrar.info Reviewed by Prof. Marco Ronchetti, Trento University, Italy PalGov © 2011 1
  2. 2. AboutThis tutorial is part of the PalGov project, funded by the TEMPUS IV program of theCommission of the European Communities, grant agreement 511159-TEMPUS-1-2010-1-PS-TEMPUS-JPHES. The project website: www.egovacademy.psProject Consortium: Birzeit University, Palestine University of Trento, Italy (Coordinator ) Palestine Polytechnic University, Palestine Vrije Universiteit Brussel, Belgium Palestine Technical University, Palestine Université de Savoie, France Ministry of Telecom and IT, Palestine University of Namur, Belgium Ministry of Interior, Palestine TrueTrust, UK Ministry of Local Government, PalestineCoordinator:Dr. Mustafa JarrarBirzeit University, P.O.Box 14- Birzeit, PalestineTelfax:+972 2 2982935 mjarrar@birzeit.eduPalGov © 2011 2
  3. 3. © Copyright NotesEveryone is encouraged to use this material, or part of it, but should properlycite the project (logo and website), and the author of that part.No part of this tutorial may be reproduced or modified in any form or by anymeans, without prior written permission from the project, who have the fullcopyrights on the material. Attribution-NonCommercial-ShareAlike CC-BY-NC-SAThis license lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creationsunder the identical terms. PalGov © 2011 3
  4. 4. Tutorial Map Intended Learning Objectives Topic TimeModule 1 (Conceptual Date Modeling) Module I: Conceptual Data ModelingA: Knowledge and Understanding11a1: Demonstrate knowledge of conceptual modeling notations and concepts Session 0: Outline and Introduction11a2: Demonstrate knowledge of Object Role Modeling (ORM) methodology. Session 1.1: Information Modeling 111a3: Explain and demonstrate the concepts of data integrity & business rules Session 1.2: Conceptual Data Modeling using ORM 1B: Intellectual Skills Session 1.3: Conceptual Analyses 111b1: Analyze application and domain requirements at the conceptual level, Session 2: Lab- Conceptual Analyses 3and formalize it using ORM. Session 3.1: Uniqueness Rules 1.511b2: Analyze entity identity at the application and domain levels. Session 3.2: Mandatory Rules 1.511b4: Optimize, transform, and (re)engineer conceptual models. Session 4: Lab- Uniqueness & Mandatory Rules 311b5: Detect &resolve contradictions & implications at the conceptual level. Session 5: Subtypes and Other Rules 3C: Professional and Practical Skills Session 6: Lab- Subtypes and Other Rules 311c1: Using ORM modeling tools (Conceptual Modeling Tools). Session 7.1: Schema Equivalence &Optimization 1.5Module 2 (Business Process Modeling) Session 7.2: Rules Check &Schema Engineering 1.5A: Knowledge and Understanding Session 8: Lab- National Student Registry 312a1: Demonstrate knowledge of business process modeling notations and concepts. Module II: Business Process Modeling12a2: Demonstrate knowledge of business process modeling and mapping.12a3: Demonstrate understand of business process optimization and re-engineering. Session 9: BP Management and BPMN: An Overview 3B: Intellectual Skills Session 10: Lab - BP Management 312b1: Identify business processes. Session 11: BPMN Fundamentals 312b2: Model and map business processes. Session 12: Lab - BPMN Fundamentals 312b3: Optimize and re-engineer business processes. Session 13: Modeling with BPMN 3C: Professional and Practical Skills Session 14: Lab- Modeling with BPMN 312c1: Using business process modeling tools, such as MS Visio. Session 15: BP Management & Reengineering 3 Session 16: Lab- BP Management & Reengineering 3 PalGov © 2011 4
  5. 5. Session ILOsAfter completing this session students will be able to: 11a3: Explain and demonstrate the concepts of data integrity and business rules. 11b1: Analyze application and domain requirements at the conceptual level, and formalize it using ORM. 11b2: Analyze entity identity at the application and domain levels. PalGov © 2011 5
  6. 6. Conceptual Schema Design Steps1. From examples to elementary facts2. Draw fact types and apply population check3. Combine entity types4. Add uniqueness constraints5. Add mandatory constraints6. Add set, subtype, & frequency constraints7. Final checks, & schema engineering issues PalGov © 2011 6
  7. 7. Uniqueness ConstraintFor each state taken individually, each person has at most one weight.How can we record such information without redundancy? PalGov © 2011 7
  8. 8. Uniqueness on Unary Fact Types Is their any problem with this schema?How can we prevent people from adding such redundant information? PalGov © 2011 8
  9. 9. Uniqueness on Unary Fact Types The uniqueness constraint ensures entities are unique (no duplicates) PalGov © 2011 9
  10. 10. Uniqueness on Binary Fact Types Each Politician was born in at most one Country Each Politician heads government of at most one Country Each Country has atmost one head Politician PalGov © 2011 10
  11. 11. Uniqueness on Binary Fact Types Means many to manyIt is possible that the same Politician visited more than one Country and that the same Country was visited by more than one Politician Who can give more examples? PalGov © 2011 11
  12. 12. Uniqueness on Binary Fact TypesWhat is unique here? PalGov © 2011 12
  13. 13. Uniqueness on Binary Fact TypesWhat is unique here? PalGov © 2011 13
  14. 14. Uniqueness on Binary Fact TypesThe four uniqueness constraint patterns for a binary fact type: No duplicates are allowed in as column Each a Rs at most one b No duplicates are allowed in bs column Each b is Rd by at most one a Both the foregoing constraints apply No duplicate (a,b) rows are allowed Each a may R many bs and vice versa PalGov © 2011 14
  15. 15. How to think about Uniqueness Is the population significant? Adding counterexamples to test the constraints PalGov © 2011 15
  16. 16. Uniqueness on Binary Fact Types Which is more realistic? PalGov © 2011 16
  17. 17. Uniqueness on Ternary Fact TypesWhat are the uniqueness constraints? Each (Person, Subject) combination is unique. PalGov © 2011 17
  18. 18. Uniqueness on Ternary Fact TypesAllowed basic uniqueness constraints for a ternary fact type: PalGov © 2011 18
  19. 19. Uniqueness on Ternary Fact TypesWhat does this uniqueness mean? PalGov © 2011 19
  20. 20. Uniqueness on Ternary Fact TypesAllowed uniqueness constraint combinations for a ternary fact type: PalGov © 2011 20
  21. 21. Uniqueness on Ternary Fact TypesWhich of these constraint patterns is illegal? Why?    PalGov © 2011 21
  22. 22. Example of Uniqueness on n-ary fact typesEach (a,c,d) combination occurs in at most one row. PalGov © 2011 22
  23. 23. Uniqueness with Nested Fact Types This constraint is particularly important! Why?  Explain what is unique PalGov © 2011 23
  24. 24. What is the difference between these?  Explain the joins  Do we need uniqueness? PalGov © 2011 24
  25. 25. External Uniqueness constraintsWhat is missing? u PalGov © 2011 25
  26. 26. External Uniqueness constraintsThe meaning of the External Uniqueness Each (b,c) combination is paired with at most one a Each population R join S has bc unique (where “join” denotes “conceptual inner join”) PalGov © 2011 26
  27. 27. Example with nest fact types PalGov © 2011 27
  28. 28. Key Length Check What is wrong? Splits into Each UC in an elementary n-ary relationship must span at least n-1 roles PalGov © 2011 28
  29. 29. Key Length Check What is wrong? Splits into PalGov © 2011 29
  30. 30. DiscussionSummarize what you learnt until now?Problems of uniqueness in your daily life?Compare the uniqueness constraint in ORMwith the cardinality constraints in UML and EER? PalGov © 2011 30
  31. 31. References1. Information Modeling and Relational Databases: From Conceptual Analysis to Logical Design, Terry Halpin (ISBN 1- 55860-672-6) – Chapter 4. PalGov © 2011 31
  1. A particular slide catching your eye?

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

×