Author: Graeme C. Simsion and Graham C. Witt Chapter 8 Organizing the Data Modeling Task.

Slides:



Advertisements
Similar presentations
Chapter 16 Unemployment: Search and Efficiency Wages.
Advertisements

Chapter 7 System Models.
Copyright © 2002 Pearson Education, Inc. Slide 1.
Copyright © 2002 Pearson Education, Inc. Slide 1.
Supply of Labor to the Economy: The Decision to Work
Copyright © 2002 Pearson Education, Inc. Slide 1.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
PowerPoint Presentation
Chapter 1 The Study of Body Function Image PowerPoint
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 1 Embedded Computing.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 3.1 Chapter 3.
Author: Graeme C. Simsion and Graham C. Witt Chapter 7 Extensions and Alternatives.
Author: Graeme C. Simsion and Graham C. Witt Chapter 12 Physical Database Design.
Author: Graeme C. Simsion and Graham C. Witt Chapter 6 Primary Keys and Identity.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 5 Author: Julia Richards and R. Scott Hawley.
Chapter 10 Logical Database Design
Copyright: ©2005 by Elsevier Inc. All rights reserved. 1 Author: Graeme C. Simsion and Graham C. Witt Chapter 3 The Entity-Relationship Approach.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Graeme C. Simsion and Graham C. Witt Chapter 4 Subtypes & Supertypes.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 4 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
Author: Graeme C. Simsion and Graham C. Witt Chapter 11 Logical Database Design.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 38.
1 Chapter 40 - Physiology and Pathophysiology of Diuretic Action Copyright © 2013 Elsevier Inc. All rights reserved.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Chapter 1 Image Slides Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Relational Database and Data Modeling
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
Addition Facts
Year 6 mental test 5 second questions
Introduction to SQL 1 Lecture 5. Introduction to SQL 2 Note in different implementations the syntax might slightly differ different features might be.
1 Term 2, 2004, Lecture 3, NormalisationMarian Ursu, Department of Computing, Goldsmiths College Normalisation 5.
Database Design Using the REA Data Model
EMS Checklist (ISO model)
Table 22.1 Stakeholder summary for the Odd Shoe Company
ABC Technology Project
Database Design Process
15-1 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chapter 15 Money and Banking.
Project Management CHAPTER SIXTEEN McGraw-Hill/Irwin Copyright © 2011 by the McGraw-Hill Companies, Inc. All rights reserved.
Squares and Square Root WALK. Solve each problem REVIEW:
the Entity-Relationship (ER) Model
Systems Analysis and Design with UML Version 2.0, Second Edition
Chapter 5 Test Review Sections 5-1 through 5-4.
Addition 1’s to 20.
25 seconds left…...
Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
Week 1.
We will resume in: 25 Minutes.
Chapter 12 Strategic Planning.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 12 View Design and Integration.
Chapter 12 Enhanced Entity-Relationship Modeling Transparencies © Pearson Education Limited 1995, 2005.
Marketing Channels and Supply Chain Management
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 15 Interest Rates and the Capital Market.
TASK: Skill Development A proportional relationship is a set of equivalent ratios. Equivalent ratios have equal values using different numbers. Creating.
1 PART 1 ILLUSTRATION OF DOCUMENTS  Brief introduction to the documents contained in the envelope  Detailed clarification of the documents content.
Accounting Principles, Ninth Edition
How Cells Obtain Energy from Food
 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Chapter 14 Managing Quality Improvement Teams and Projects.
Chapter 14 The Human Resources (HR) Management and Payroll Processes
1 © Prentice Hall, 2002 Chapter 4: The Enhanced E-R Model and Business Rules Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
Examining Student Work. Ensuring Teacher Quality Leader's Resource Guide: Examining Student Work 2 Examining Student Work Explore looking at student work.
Presentation transcript:

Author: Graeme C. Simsion and Graham C. Witt Chapter 8 Organizing the Data Modeling Task

Copyright: ©2005 by Elsevier Inc. All rights reserved. 2 Generalization (2) Breaking the rule of non-overlapping of sub-types Benefits of sub and super-types Other Types of Generalization –Relationship Generalization –Attribute Generalization –Alternative diagramming Conventions

Copyright: ©2005 by Elsevier Inc. All rights reserved. 3 Overlapping Subtypes and Roles There are several tactics we can use without breaking the no overlaps rule: –Ignoring real-world overlaps –Modeling only the Supertype –Modeling the roles as participation in relationships –Role entity classes and one-to-one relationships –Multiple partitions

Copyright: ©2005 by Elsevier Inc. All rights reserved. 4 Ignoring Real-World Overlaps While a customer and a supplier may in fact be the same person, the business may be happy to treat them as if they were separate individuals. –Beware the company that sued a customer for non- payment only to find that they were also a supplier and were withholding because the company had failed to pay them. You thus need to be careful in choosing not to reflect real-world overlap in the data model. But, dont automatically model all overlaps!

Copyright: ©2005 by Elsevier Inc. All rights reserved. 5 Modeling Only the Supertype One of the most common approaches to modeling the roles of persons and organizations is to use only a single supertype entity class for all roles. –If subtyping is done at all, it is on the basis of some other criterion, such as legal entity class type partnership, company, individual, etc. –The supertype is typically named Party, Involved Party, or Legal Entity. The major limitation of the approach is that we cannot readily capture in the model the fact that some relationships apply only to certain roles.

Copyright: ©2005 by Elsevier Inc. All rights reserved. 6 Modeling the Roles as Participation in Relationships In the supertype-only model roles can often be described in terms of participation in relationships. –a customer is a party who maintains an account –a supplier as a party who participates in a contract for supply.

Copyright: ©2005 by Elsevier Inc. All rights reserved. 7 Using Role Entity Classes and One-to-One Relationships

Copyright: ©2005 by Elsevier Inc. All rights reserved. 8 The party role explained The role entity classes can be supertyped into Party Role –This is to facilitate communication and we would be most unlikely to implement at this level, : we could have no distinction among roles that the role entity classes were designed to provide. –intermediate supertyping is often useful in that it helps us to address the roles we need in specific contexts The role entity class approach is usually the neatest solution to the problem when there are significant differences in the attributes and relationships applicable to different roles.

Copyright: ©2005 by Elsevier Inc. All rights reserved. 9 Multiple Partitions Several CASE tools allow multiple breakdowns (partitions) into complete, non- overlapping subtypes. (opposite)

Copyright: ©2005 by Elsevier Inc. All rights reserved. 10 Example explained Only a public company can be listed on a stock exchange. Only an overseas company can be represented by a local company. If a given company could be both public and local, for example, it would be difficult to model both of these constraints if we were restricted to a single partition.

Copyright: ©2005 by Elsevier Inc. All rights reserved. 11 Translating multiple partitons Translation to a relational model is difficult. We can do any one of the following: 1.Implement only the highest level supertype as a table 2.Select one partition and implement the subtypes as tables, e.g., Private Company and Public Company 3.Implement multiple levels selecting only some of the partitions, e.g., implement only Company, Private Company and Public Company as tables 4.Implement multiple levels and multiple partitions, e.g., implement Company, Local Company, Overseas Company, Private Company and Public Company all as tables.

Copyright: ©2005 by Elsevier Inc. All rights reserved. 12 When do we stop? Dont subtype where sub-types have different identifiers, or different attribute groups, or participate in different relationships, or where some sub-types engage in critical processes and others do not Dont sub-type where migration of occurrences from one sub-type to another is common

Copyright: ©2005 by Elsevier Inc. All rights reserved. 13 Benefits of Using Subtypes and Supertypes Creativity – Can this entity class be subtyped into more specific entity classes that represent distinct business concepts? and, – Are any of the entity classes candidates for generalization into a common supertype? Presentation: Level of Detail Communication Input to the Design of Views Classifying Common Patterns Divide and Conquer (top-down) Approach to Modeling

Copyright: ©2005 by Elsevier Inc. All rights reserved. 14 Relationship generalization resulting from entity generalization

Copyright: ©2005 by Elsevier Inc. All rights reserved. 15 Generalizing mutually exclusive 1:many relationships

Copyright: ©2005 by Elsevier Inc. All rights reserved. 16 Mutually Exclusive Relationships Diagramming convention for mutually exclusive relationships

Copyright: ©2005 by Elsevier Inc. All rights reserved. 17 Attribute Generalization within Entity Classes: One Class! FINANCIAL PERFORMANCE (Department No, Year, Approved By, First Quarter Material Budget Amount, Second Quarter Material Budget Amount, Third Quarter Material Budget Amount, Last Quarter Material Budget Amount, First Quarter Material Actual Amount, Second Quarter Material Actual Amount, Third Quarter Material Actual Amount, Total Material Actual Amount, First Quarter Labor Budget Amount, Second Quarter Labor Budget Amount, Third Quarter Labor Budget Amount, Last Quarter Labor Budget Amount, First Quarter Labor Actual Amount, Second Quarter Labor Actual Amount, Third Quarter Labor Actual Amount, Total Labor Actual Amount, Other Budget Amount, Other Actual Amount, Discretionary Spending Limit)

Copyright: ©2005 by Elsevier Inc. All rights reserved. 18 Generalizing Budget vs. Actual for Each Category FINANCIAL PERFORMANCE (Department No, Year, Approved By, Discretionary Spending Limit) MATERIAL BUDGET ITEM (Department No, Year, Period Number, Material Budget Amount) LABOR BUDGET ITEM (Department No, Year, Period Number, Labor Budget Amount) OTHER BUDGET ITEM (Department No, Year, Period Number, Other Budget Amount) MATERIAL ACTUAL ITEM (Department No, Year, Period Number, Material Actual Amount) LABOR ACTUAL ITEM (Department No, Year, Period Number, Labor Actual Amount) OTHER ACTUAL ITEM (Department No, Year, Period Number, Other Actual Amount)

Copyright: ©2005 by Elsevier Inc. All rights reserved. 19 Generalizing to Budget vs. Actual for All Categories FINANCIAL PERFORMANCE (Department No, Year, Approved By, Discretionary Spending Limit) BUDGET ITEM (Department No, Year, Period Number, Budget Type, Budget Amount) ACTUAL ITEM (Department No, Year, Period Number, Budget Type, Actual Amount)

Copyright: ©2005 by Elsevier Inc. All rights reserved. 20 The Thing Equivalent for Attributes

Copyright: ©2005 by Elsevier Inc. All rights reserved. 21 … And Generalized generalization for kind of equipment and parameter type vs. actual equipment and value

Copyright: ©2005 by Elsevier Inc. All rights reserved. 22 Diagramming Conventions Boxes in Boxes (the text) Most of the alternative conventions, including UML are based around lines between supertypes and subtypes. –confused with relationships, –implies that the model allows redundant data.

Copyright: ©2005 by Elsevier Inc. All rights reserved. 23 Using Tools that Do Not Support Subtyping usually tools suggest subtypes be shown as one-to-one relationships. suggest you adopt a relationship name, such as be or is,

Copyright: ©2005 by Elsevier Inc. All rights reserved. 24 Beginning next lecture Now that we know about the tools we can begin to explore using them in anger in real business contexts –Process/stages and deliverables –Data warehousing