DAT376 Modeling Business Requirements using Object Role Modeling (Part 2) LeRoy Tuttle, Jr. Program Manager Microsoft.

Slides:



Advertisements
Similar presentations
Chapter 6: Entity-Relationship Model (part I)
Advertisements

Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Enhanced Entity-Relationship Modeling. Strong and Weak Entity Types Strong entity: Each object is uniquely identifiable using primary key of that entity.
Chapters 7 & 9 System Scope
Systems Development Life Cycle
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 6 Advanced Data Modeling.
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 6 Methodology Logical Database Design for the Relational Model Transparencies © Pearson Education Limited 1995, 2005.
LIS 557 Database Design and Management William Voon Michael Cole Spring '04.
System Analysis - Data Modeling
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Basic (Flat) Relational Model.
Systems Development Life Cycle
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke Database Processing Tenth Edition Chapter 5 Data.
Modeling Data The Entity Relationship Model (ER) For Database Design.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Chapter 3: Modeling Data in the Organization
Fundamentals, Design, and Implementation, 9/e COS 346 Day 2.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Chapter 4 Entity Relationship (E-R) Modeling
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Chapter 14 & 15 Conceptual & Logical Database Design Methodology
1 CONCEPTUAL SCHEMA DESIGN PROCESS Information Processing and Technology, 2001 Yr 12 IPT.
1 NORMA Lab. 4 File: NORMA_Lab4.ppt. Author: T. Halpin. Last updated: 2011 September 6 Revision: Adding Value Constraints, Set-comparison Constraints Adding.
Chapter 4 The Relational Model.
1 Introduction to modeling Relational modelling Slides for this part are based on Chapters 11 from Halpin, T. & Morgan, T. 2008, Information Modeling and.
DAT375 Modeling Business Requirements using Object Role Modeling (Part 1) LeRoy Tuttle, Jr. Program Manager Microsoft.
Web-Enabled Decision Support Systems
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
1 CONCEPTUAL SCHEMA DESIGN PROCESS Information Processing and Technology, 2001 Yr 12 IPT.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Chapter 8 Data Modeling Advanced Concepts Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
IS 475/675 - Introduction to Database Design
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Metamodels for Object Role Modeling Hongyan Song March 2005.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
1 Introduction to modeling ER modelling Slides for this part are based on Chapters 8 from Halpin, T. & Morgan, T. 2008, Information Modeling and Relational.
© D. Wong Ch. 2 Entity-Relationship Data Model (continue)  Data models  Entity-Relationship diagrams  Design Principles  Modeling of constraints.
1 Introduction to modeling Object-role modelling (ORM) Slides for this part are based on Chapters 3-7 from Halpin, T. & Morgan, T. 2008, Information Modeling.
Databases Illuminated Chapter 3 The Entity Relationship Model.
Entity Relationship Modeling
Computing & Information Sciences Kansas State University Friday, 26 Sep 2008CIS 560: Database System Concepts Lecture 13 of 42 Friday, 26 September 2008.
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Chapter 15 & 16 Conceptual and Logical Database Design Methodology Thomas Connolly, Carolyn Begg, Database System, A Practical Approach to Design Implementation.
1 Database Systems Entity Relationship (E-R) Modeling.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 9: Test Generation from Models.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
Logical Database Design and the Relational Model.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
Introduction to modeling
Lecture 4: Logical Database Design and the Relational Model 1.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
Enhanced Entity-Relationship and UML Modeling. 2.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 4- 1.
1 Reference Scheme Reduction on Subtypes in ORM Andy Carver and Terry Halpin INTI International University, Malaysia
IT 5433 LM2 ER & EER Model. Learning Objectives: Explain importance of data modeling Define and use the entity-relationship model Define E/R terms Describe.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
The interplay of mandatory role and set-comparison constraints Dr. Peter Bollen School of Business and Economics Maastricht University, the Netherlands.
COP Introduction to Database Structures
Comp 1100 Entity-Relationship (ER) Model
Databases (CS507) CHAPTER 7.
Logical Database Design and the Rational Model
Enhanced Entity-Relationship (EER) Model
Methodology Logical Database Design for the Relational Model
Chapter 5: Logical Database Design and the Relational Model
Entity-Relationship Modeling
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Introduction to modeling
Presentation transcript:

DAT376 Modeling Business Requirements using Object Role Modeling (Part 2) LeRoy Tuttle, Jr. Program Manager Microsoft

Agenda – Part 2 (DAT376) Visual Studio.NET Enterprise Architect Object Role Modeling Database Design Process Set Theory Review Object Role Modeling Conceptual Schema Design Procedure – – Modeling fact types – Constraining fact types Documenting the Model Documenting the Model Implementing the Model Implementing the Model

VSEA Database Design Tools Visio-based (VEA) Visio-based (VEA) – Conceptual data modeling (ORM) – Logical database modeling (Relational, IDEF1X, “ER”) – Physical database modeling (SQL Server, Access, Oracle, DB2, etc.) – Forward and reverse engineering, sync, import/export, reports, etc. Non-Visio Non-Visio – Online physical database design tools – SQL query designer 3

The Baseline Database Design Process 4 Modeling business requirements Modeling databases External Conceptual Logical Physical

Business Context as a Foundation 5 Universe of Discourse Record Keeping SQL

Conceptual Schema Design Procedure (CSDP) Model Relationships 1) Analyze External Information and Create a Conceptual Model 2) Draw a Fact Types and Apply a Population Check 3) Identify Primitive Entity Types and Reformulate Arithmetically Derived Fact Types Derived Fact Types Constrain Relationships 4) Add Uniqueness Constraints and Check Arity of Fact Types 5) Add Mandatory Role Constraints and Check for Logical Derivations Derivations 6) Add Value and Set Constraints, and Create Entity Subtypes 7) Add Frequency, Ring, and Other Constraints

CSDP Step 4 Add uniqueness constraints, and check the arity of fact types – Constrain population of fact types – Redundancy is not allowed in a completed conceptual model – Re-express non-elementary facts (N-1 Rule) – Minimal ORM Model!

How Internal Uniqueness Constraints Are Symbolized – Arrow-tipped line over role shape – Spans one or more roles 7

Examples of internal uniqueness constraints on binary facts 9 For each A, one B For each B, one A, and for each A, one B All of AB is unique

Examples of internal uniqueness constraints on ternary facts 10 For each AB, one C For each AC, one B All ABC is unique

For every AB, one C, and for every AC, one B Example of overlapping internal uniqueness constraints 11

How External Uniqueness Constraints Are Symbolized – Dashed line between roles – Circled ‘U’ in middle of line – Line connects to roles in the constraint 12

Example of external uniqueness constraint 13 Instances of BC are unique

How Nested Object Types Are Symbolized 15

CSDP Step 4 demo demo 16

CSDP Step 5 Add mandatory role constraints and check logical derivations – Nullability – Cardinality – Role functional dependency

Person … drives … Roles and Object Type Populations 18 … resides in … … works for … A, B A, C B, C Role Population A, B A, C Role Population A, B A, C B, C Role Population Instances of Person in Roles Instances of Person in Roles Union of Role Instances Figure 6.1 Subset of Person Population

Independent Object Types A given instance is not required to participate in any roles A given instance is not required to participate in any roles An object type’s population is larger than all of its role’s populations, except for its reference mode An object type’s population is larger than all of its role’s populations, except for its reference mode Role Population DD CC BB AA Object Type Population DD CC BB AA EE Instance Is Not In Role’s Population Instance Is Not In Role’s Population 19

How Mandatory Role Constraints Are Symbolized 21

How Disjunctive Role Constraints Are Symbolized 23

Identifying Entity Types Global means Global means Candidate identifiers Candidate identifiers Primary reference scheme Primary reference scheme 24 Emp num Emp num Employee name Dept Adams A Brown T Cantor G Codd EF Adams A Brown T Cantor G Codd EF Computer Science Biochemistry Mathematics Computer Science Biochemistry Mathematics Computer Science Phone Ext Access LOC INT LOC INT Tenured/ nontract- expiry Tenured/ nontract- expiry 01/31/95 Tenured 01/31/95 Tenured Location Blg Room 720Brown TBiochemistry LOC01/31/95 Candidate Identifier

What Is a Simple Reference Scheme? Definition Definition A simple reference scheme uses instances of a single value type to identify an entity type Characteristics Characteristics – Implied binary fact type – Mandatory role – Simple uniqueness constraint 25

How a Internal Compound Reference Scheme is Symbolized 27

How a External Compound Reference Scheme is Symbolized 28

What Are Transitively Implied Relationships? Definition Definition Object types exhibit a transitive implied relationship when an unbroken chain of comparable relationships is formed spanning a series of object types Characteristics Characteristics – Use in logic and mathematics – Conducts characteristics Examples Examples – If X =Y and Y = Z, then X = Z – If X > Y and Y > Z, then X > Z – If X is like Y and Y is like Z, then X is like Z

Example of a Logically Derivable Fact Type 32

CSDP Step 5 demo demo 34

CSDP Step 6 Add value, set, and subtype constraints – Domain of a population – Comparing and contrasting set populations – Specialization of object types

Domain of a Population All allowable values All allowable values Values in domain are unique Values in domain are unique Population is not always unique Population is not always unique Population AA BB CC AA ZZ Domain A A B B C C Not in the Domain 36

How Value Constraints Are Represented FORML expression FORML expression Person(Name) is an entity object type. Every Person is identified by one distinct Name. The possible values of 'Name' are: 'Jeff', 'Maria', 'Pierre'. Value Constrain t 38

Comparing and Contrasting Set Populations Set equality Set equality Subset Subset Set exclusion Set exclusion 39 Set 1Set 2 Set 3Set 4 Set 1Set 3 BBCCAA BBCCAABBCCAA BBAA BB CC AA

How Set Constraints Are Represented Set exclusion Set exclusion Set equality Set equality Set subset Set subset 41 Exclusion Constraint Equality Constraint Subset Constraint No Employee that is paid some HourlyWage is paid some Salary. Employee e is paid some Salary if and only if Employee e works as some SalesManager. If Employee e works as some SalesManager then Employee e works as some Salesperson

Specialization of Object Types Subsets of a population Subsets of a population Subsets have distinctive characteristics Subsets have distinctive characteristics – Specialized relationships – Specialized constraints – Start from primitive object types Top-down process Top-down process – Arrows point toward node that was specialized 42 A B G C D F E

How Subtype Relationships Are Represented Salesperson is primarily identified by the identification scheme of Employee. Salesperson is a subtype of Employee / Employee is a supertype of Salesperson. Employee is the primary super type of Salesperson. Each Manager is a Salesperson but not every Salesperson is necessarily a Manager. Primary Subtype Relationshi p Secondary Subtype Relationship Subtype Relationshi p

CSDP Step 6 demo demo 46

CSDP Step 7 Add other constraints and perform final checks – Reoccurring domain values – Cardinality – Intra-population relationships – Other constraints

Reoccurring Domain Values Each instance must have an allowable value from the population domain Each instance must have an allowable value from the population domain Multiple instances could have the same value Multiple instances could have the same value 48 Population AA AA CC AA CC Domain A A B B C C

How Frequency Constraints Are Represented 50 Each Person occurs exactly 2 times or not at all. Each Car, Location combination that occurs, occurs at least 3 and at most 4 times. Frequency Constraint

Object Type Intra-Population Relationships Instances of a single object type Instances of a single object type Related groups of instances Related groups of instances – Circularly related groups – Hierarchically related groups – Set relationships between groups 51

How Ring Constraints Are Symbolized 53 Ring Constraint Ring Constraint Ring Constraint Ring Constraint Ring Constraint Ring Constraint

Purpose Purpose Non-example data Non-example data Irreflexive Ring Constraints Mathematical expression Mathematical expression 54 R is irreflexive iff for all x ~ xRxxxyy Figure 8.X A A B B B B D D C C B B D D E E A A A A AA Constraint Violation! Constraint Violation! No instance is related to itself

Purpose Purpose Non-example data Non-example data Symmetric Ring Constraints Mathematical expression Mathematical expression 55 R is symmetric iff for all x, y xRy  yRx Must have mirror imagexxyy Figure 8.X A A A A A A B B B B B B B B A A A A C C AC Constraint Violation! Constraint Violation! Must have mirror images

Purpose Purpose Non-example data Non-example data Asymmetric Ring Constraints Mathematical expression Mathematical expression 56 R is asymmetric iff for all x, y xRy  ~yRxxxyy Figure 8.X A A B B B B C C A A A A C C D D B B A A BA Constraint Violation! Constraint Violation! No opposites

R is antisymmetric iff for all x, y x = y & xRy  ~yRx Purpose Purpose Non-example data Non-example data Antisymmetric Ring Constraints Mathematical expression Mathematical expression 57 xxyy Figure 8.X A A B B B B C C A A A A C C D D B B A A BA Constraint Violation! Constraint Violation! AA Constraint Violation! Constraint Violation! No opposites or mirror images /

Purpose Purpose Non-example data Non-example data Intransitive Ring Constraints Mathematical expression Mathematical expression 58 R is intransitive iff for all x, y, z xRy & yRz  ~xRzxxyy Figure 8.X A A B B B B C C C C D D D D E E A A E E AE Constraint Violation! Constraint Violation! You cannot skip a generation

R is acyclic iff for all x, y, z xRy & yRz  ~zRx Purpose Purpose Non-example data Non-example data Acyclic Ring Constraints Mathematical expression Mathematical expression 59 No ancestor is a descendant xxyy Figure 8.X A A B B B B D D C C E E D D F F F F A A FA Constraint Violation! Constraint Violation!

Valid Ring Constraint Combinations 60

CSDP Step 7 demo demo 61

Documenting the ORM Model demo demo 62

Forward & Reverse Engineering 63

ORM -> ER -> DDL demo demo 65

Concluding Remarks Modeling Business Requirements vs. Modeling a Database Modeling Business Requirements vs. Modeling a Database Use data use cases to seed data models Use data use cases to seed data models Use ORM for information analysis Use ORM for information analysis Use Visual Studio.NET Ent. Architect for conceptual, logical, and physical database modeling Use Visual Studio.NET Ent. Architect for conceptual, logical, and physical database modeling Consider mapping ORM to other logical structures Consider mapping ORM to other logical structures 66

Further Resources MOC Course 2090: Modeling Business Requirements to Create a Database Using Visual Studio.NET Enterprise Architect MOC Course 2090: Modeling Business Requirements to Create a Database Using Visual Studio.NET Enterprise Architect (Episode 25) (Episode 25) us/dv_vstechart/html/vstchvsea_ormoverview.asp us/dv_vstechart/html/vstchvsea_ormoverview.asp us/dv_vstechart/html/vstchvsea_ormoverview.asp us/dv_vstechart/html/vstchvsea_ormoverview.asp (+ articles on use of VEA) (+ articles on use of VEA) Halpin, T.A. 2001, Information Modeling and Relational Databases, Morgan Kaufmann (ISBN ) Halpin, T.A. 2001, Information Modeling and Relational Databases, Morgan Kaufmann (ISBN )

Don’t forget to complete the on-line Session Feedback form on the Attendee Web site

69

Backup Slides – Definitions – Guidelines

What Are Uniqueness Constraints? Definition Definition A uniqueness constraint prevents duplication of role instances spanned by the constraint Characteristics Characteristics – Prevent fact redundancy – Enforce internal uniqueness – Enforce external uniqueness – Enforce functional dependency 7

What Are Nested Object Types? Definition Definition A nested object type is a fact type that is treated as an object type and has an internal structure that is composed of the roles in a fact type’s predicate Characteristics Characteristics – Play a role in another fact type – Used with external constraints between fact types 14

What Are Mandatory Role Constraints? Definition Definition A mandatory role constraint forces all instances of an object type to participate in a given role. Reference roles are always mandatory Characteristics Characteristics – Global nature – Implied with functional dependency FORML expression FORML expression 20

What Are Disjunctive Mandatory Role Constraints? Definition Definition A disjunctive mandatory role constraint is an inclusive-or constraint that applies to a set of two or more roles Characteristics Characteristics – Multi-role mandatory role constraint – Connected to the same object type – Instance must participate in at least one role FORML expression FORML expression 22

What Is a Compound Reference Scheme? Definition Definition A compound reference scheme uses the unique population of a related group of roles to identify an entity type Characteristics Characteristics – Tuple based – Implied mandatory – Uniqueness constraint spans identifying roles 26

What Are Logically Derivable Fact Types? Definition Definition The information in a logically derivable fact type is inferred from other fact types. Logically derivable fact types are typically based upon related but separate elementary fact types Characteristics Characteristics – Usually contain hidden information – Not normally shown on diagram – All explicit constraints are normally derivable – Relationships that are transitively implied from other relationships 31

What Are Value Constraints? Definition Definition Value constraints limit the population of an object type to a specific domain of allowable values Characteristics Characteristics – Global effect on an object type’s roles – Defined by enumerated list of values – Limit the effect on the Universe of Discourse 37

What Are Set Constraints? Definition Definition Set constraints restrict two populations in relation to each other Set constraints restrict two populations in relation to each other Characteristics Characteristics – External – Constrain two roles or tuples – Transfer the impact of constraints 40

What Are Entity Subtypes? Definition Definition An entity subtype is an object type that is contained in another object type An entity subtype is an object type that is contained in another object type Characteristics Characteristics – Identified by the primary supertype’s reference scheme – Populations may overlap through implied set constraint – Reuse through inheritance – Subtypes are transitively related – Cumulative relationships and constraints – Based on primitive entity types 43

What Are Frequency Constraints? Definition Definition Frequency constraints restrict the number of instances in a population that may share the same domain value Characteristics Characteristics – Specify the cardinality of a role – Apply to a role or tuple – Control the size of the population of a fact type Special types of frequency constraints Special types of frequency constraints – Mandatory role – Uniqueness 49

What Are Ring Constraints? Definition Definition Ring constraints control the population of an object type’s roles when the object type has two roles in a fact type Characteristics Characteristics – Common object type – Recursively related role populations – Strong constraint – Six different types 52

Guidelines for Selecting a Primary Reference Scheme 29 Where applicable, use reference mode Minimize the number of roles Favor stable, rigid identifiers Be wary of information bearing identifiers Decompose information bearing identifiers Normalize units of measurement

Guidelines for Logically Derivable Fact Types 33 Look for other relationships of interest between fact types Look for derivable constraints Look for circular relationship chains Avoid them!

Guidelines for Implementing Entity Subtypes 45 Explicitly constrain subtypes to enforce different uses Create a chain of subtypes relating back to a primitive entity type Do not create a subtype unless there is a specific role for it Avoid assigning a subtype its own reference scheme

Multimedia: ORM Relational Mapping Process in Microsoft Visio Enterprise Architect Edition 64