Sep 20 15 01 DASSUG Dr Terry Halpin ORM 09 07

Information about Sep 20 15 01 DASSUG Dr Terry Halpin ORM 09 07

Published on November 30, 2007

Author: Carlton

Source: authorstream.com

Content

Model Driven Development with ORM 2 and NORMA:  1 Model Driven Development with ORM 2 and NORMA © 2007 T. Halpin & Neumont University Terry Halpin Neumont University [email protected] www.orm.net Slide2:  2 ORM Features, History, and Tool Support The Data Modeling Process ORM’s Graphical Language Comparison with ER and UML Case Study Relational Mapping and Tool Demos Slide3:  3 ORM Features, History, and Tool Support The Data Modeling Process ORM’s Graphical Language Comparison with ER and UML Case Study Relational Mapping and Tool Demos Temporal aspects of Data Modeling Slide4:  4 A conceptual approach for modeling, querying, and transforming data Fact-oriented (attribute-free). All facts are modeled as relationships (unary, binary, ternary …)1 Semantic stability (no remodeling or requerying to talk about an attribute) Facilitates validation by verbalization & population Richly expressive graphical constraint language (compared with industrial ER, or UML class diagrams). Object-Role Modeling (ORM) 1 The OMG’s SBVR approach is also fact-oriented. Slide5:  5 Modeling Approach = Modeling Procedure(s) + Modeling Language(s) ORM includes procedures for conceptual modeling and for mapping (transforming) ORM models and queries to attribute-based models (e.g. Relational, OO, ER, UML, XSD, OWL). ORM includes graphical and textual modeling languages and a textual query language. ORM History and Tool Support:  ORM History and Tool Support Originated in 1970s in Europe Various flavors (NIAM2007, ORM 2, FCO-IM etc.) First ORM tools developed at Control Data labs in Brussels (IAST, RIDL*) USA tools: InfoDesigner, InfoModeler, ActiveQuery, ORM Source Model solution in Microsoft Visio for Enterprise Architects Current European tools: CaseTalk, Infagon, CogNIAM ORM 2 tool under development: NORMA (open source plug-in to Visual Studio .NET) This presentation focuses on ORM 2 (2nd generation ORM) 6 Slide7:  7 ORM Features, History, and Tool Support The Data Modeling Process ORM’s Graphical Language Comparison with ER and UML Case Study Relational Mapping and Tool Demos Temporal aspects of Data Modeling Slide8:  Going from a process use case to a data model 8 Data Use Cases:  For data modeling, we need DATA use cases (cases of data being used), e.g. Sample reports Sample input forms Sample queries How to go from a data use case to a data model? Have the domain expert verbalize the data Rephrase this as unambiguous, elementary facts Add and validate the business rules constraining the data Data Use Cases 9 Analysis is a Joint Activity:  The domain expert best understands the business domain The modeler elicits and formalizes this understanding The modeler assists the domain expert to identify the business rules related to the data (constraints or derivation rules) The modeler validates the model with the client by Verbalizing the model in natural language Populating the model with positive/negative examples Analysis is a Joint Activity 10 Slide11:  11 Data (uninterpreted syntax) The Patient with Patient# ‘571’ has a Temperature of 100 oF Fact (proposition taken to be true) Information = data + semantics 571 Slide12:  12 An elementary fact is an assertion that an object has a property * or one or more objects participate in a relationship ** where the fact cannot be split into simpler facts with the same objects (without info-loss) * plays a role by itself ** play different roles in the same association Elementary Facts The Person named ‘Jack Smith’ smokes.:  13 The Person named ‘Jack Smith’ smokes. A unary fact A binary fact The Executive named ‘William Portals’ climbed the Mountain named ‘Mt Rainier’. Facts may also be of higher arity (4 or more roles). A ternary fact The Person named ‘Don Bradman’ played the Sport named ‘Cricket’ for the Country named ‘Australia’. An Old but Fun Example:  An Old but Fun Example 14 Slide15:  15 Feasibility study Requirements analysis Conceptual design (data, process) Logical design (data, process) External design (data, process) Prototyping Internal design and implementation Testing, validation, and maintenance Large projects are often developed iteratively Overall Procedure: Information systems life cycle Slide16:  16 Conceptual analysis usually involves: high level service (essential business process) modeling information modeling For large applications: divide the UoD into manageable sub-sections prioritize the order in which sub-sections will be modeled apply the Conceptual Schema Design Procedure (CSDP) to each sub-section integrate the subschemas into a global conceptual schema Many applications build on existing applications: reverse-engineer the existing model(s) to a conceptual model refine the conceptual model to fit the new business needs Slide17:  17 Conceptual schema design procedure Slide18:  18 ORM Features, History, and Tool Support The Data Modeling Process ORM’s Graphical Language Comparison with ER and UML Case Study Relational Mapping and Tool Demos ORM 2 Graphical Modeling Language:  ORM 2 Graphical Modeling Language Object = Entity or Value Entity = Object that is identified by a definite description. Entities typically change their state over time. Entities may be concrete or abstract. e.g. The Country that has CountryCode ‘AU’. The President named ‘Abraham Lincoln’. The Course with course code ‘CS542’. Entity types are depicted as named, soft rectangles. As a configuration option, soft rectangles may be replaced by hard rectangles or ellipses. 19 Slide20:  Value = Lexical Constant (typically a character string or number). Values are literal and cannot change their state. e.g. The CountryCode ‘AU’. The PresidentName ‘Abraham Lincoln’. The CourseCode ‘CS542’. The RoomNumber ‘207’. The SerialNumber 1090. Value Types are depicted as named, dashed rectangles. Optionally, ellipses or hard rectangles may be used instead. 20 Slide21:  21 Many entities are identified by their relationship to a simple value. If this is true for all instances of their entity type, the reference (identification) scheme for their entity type may be displayed as a reference mode in parenthesis. The reference mode may be popular, unit-based, or general. A popular reference mode has a corresponding value type that is used to identify entities of one type only, and is preceded by a dot. e.g. The value type name appends the reference mode name to the entity type name, with a user-definable format that may include a separator e.g. CountryCode CourseCode PresidentName etc. Country_Code Course_Code President_Name etc. Slide22:  22 A unit-based (or measurement) reference mode uses a unit based on some unit dimension (whose display is often suppressed)1. A colon “:” is appended to the unit e.g. The value type name appends “Value” to the reference mode name (if the language is English) with a user-definable format e.g. cmValue USDValue cm_Value USD_Value If desired, the unit type may be displayed after the colon, e.g. 1 Support for unit-based reference etc. is expected by end 2007 Slide23:  23 Different units based on the same unit dimension are permitted in the same model, e.g. General reference modes have the same name as their value type. The value type may be used to reference multiple entity types e.g. Slide24:  24 An independent object type may have instances that exist in the model without participating in any other relationships. Independent object types have a “!” placed after their name e.g. If an object type shape is duplicated in the diagram (either on the same page or on different pages) this is shown by a shadow e.g. An external object type is defined in another model. The display notation “^” is tentative e.g. Slide25:  25 Predicates (relationships) have one or more roles, each played by instances of a single object type. Predicate readings may be shown in mixfix notation1 using … as an object placeholder, e.g. … introduced … to … For unary and binary predicates with no leading or trailing text, the placeholder may be omitted e.g. smokes i.e. … smokes likes i.e. … likes … Roles may also be named. Duplicate predicate shapes are shadowed. 1 Mixfix allows natural verbalization of predicates of any arity, and non-infix predicates (common in many foreign languages). Slide26:  26 For binary predicates, forward and inverse readings may be shown separated by “/”. Alternatively, arrow tips may be used. Combining a predicate with its object type(s) forms an elementary or compound fact type. An elementary fact can’t be split into smaller facts with the same objects, without information loss e.g. Slide27:  27 A compound fact type includes two or more fact types, and if used in a model must be declared to be derived e.g. An existential fact (or reference) simply asserts the existence of an object e.g. There exists a Country that has CountryCode ‘US’. Existential fact types are displayed either using a reference mode or an explicit relationship, e.g. This includes constraints (see later). Slide28:  28 e.g. An elementary fact type may be objectified, resulting in another object type. A fact type may be: asserted (base fact type) fully derived derived and stored semi-derived Slide29:  Uniqueness constraints require instances of their role or role sequence to be unique in the role or role sequence population. Internal uniqueness constraints apply to a single predicate and are depicted by bar(s) over the constrained role(s). External uniqueness constraints apply to roles from different predicates and are depicted by circled bars connected to the roles. If the constraint applies to role(s) used to provide the preferred identification scheme for an object type, a double-bar is used. 29 Slide30:  A simple mandatory role constraint requires its role to be played by all instances of its object type’s population and is shown by a solid dot at either end of the role-type connector. An inclusive-or (or disjunctive mandatory role) constraint requires at least one of its roles to be played by all instances of its object type’s population and is shown by a circled, solid dot connected to the roles. 30 Slide31:  31 e.g. Slide32:  32 Object Value Constraints Role Value Constraints Slide33:  33 Subset Constraints Slide34:  34 Equality Constraints Slide35:  35 Exclusion Constraints Exclusive-Or Constraints Slide36:  Subtyping 36 Slide37:  Frequency Constraints 37 Slide38:  Ring Constraints 38 Slide39:  The previous constraints are all alethic (necessarily true for each state). ORM 2 also supports deontic versions of all these constraints 39 Slide40:  40 Uniqueness constraint on first role +ve form: Each Moon orbits at most one Planet. Illustrated by a satisfying fact population. -ve form: It is impossible that the same Moon orbits more than one Planet. Test with a counter-example. } Counter-example Model Validation Slide41:  41 The absence of a uniqueness constraint on the second role may be verbalized using default form: It is possible that the same Planet is orbited by more than one Moon. Illustrated by a satisfying fact population. Slide42:  42 Sample screenshot showing automated verbalization (+ve plus some default) for some selected aspects. Currently about 80% of constraints are verbalized. The rest should be implemented in a few months. Slide43:  43 Alethic: It is possible that more than one Patient is a husband of the same Patient and that more than one Patient is a wife of the same Patient. Each Patient, Patient combination occurs at most once in the population of Patient is a husband of Patient. Deontic: It is obligatory that each Patient is a husband of at most one Patient. It is obligatory that each Patient is a wife of at most one Patient. In ORM 2, rules may be assigned different modalities Slide44:  44 ORM Features, History, and Tool Support The Data Modeling Process ORM’s Graphical Language Comparison with ER and UML Case Study Relational Mapping and Tool Demos Slide45:  45 ER and UML class diagrams are attribute-based, leading to more compact diagrams that are closer to implementation schemas. UML also includes many other diagram types to deal with process modeling etc. ORM’s attribute-free nature facilitates validation by verbalization and population and semantic stability. ORM’s graphic language is far richer for data modeling than that of ER and UML, and its textual languages are far easier for non-technical users to understand than UML’s OCL. ORM’s graphical language is also orthogonal and unambiguous (unlike UML). Slide46:  46 UML’s multiplicity notation is fine for binaries but not for n-aries e.g. can’t express as a multiplicity Slide47:  47 UML’s xor is defined between associations, not association roles, so this is ambiguous. ORM correctly defines the constraint between roles and treats it as a combination of exclusion and inclusive-or. Slide48:  48 ORM models are immune to changes that reshape attributes as entity types or relationships. The meaning of a query is not changed if we change a constraint or add a new fact type. ORM queries respect this principle and hence facilitate schema evolution. ER and OO queries do not: such changes can cause attributes to be remodeled; hence, existing queries need to be reformulated. Semantic stability Slide49:  49 List titled people and their gender üPerson --- has Title --- is of üGender select SSN, gender from Person where title is not null Slide50:  50 List titled people and their gender üPerson --- has Title --- is of üGender select Person.SSN, gender from Person join PersonTitle on Person.SSN = PersonTitle.SSN Slide51:  51 Have your cake and eat it too by using ORM for conceptual analysis and mapping it to ER or UML views as desired. It is expected that the NORMA tool will provide automatic, live generation of both ER and UML views by the end of 2008. Slide52:  52 ORM Features, History, and Tool Support The Data Modeling Process ORM’s Graphical Language Comparison with ER and UML Case Study Relational Mapping and Tool Demos Slide53:  Specify an ORM schema for this report from a book publisher. Slide55:  Model this report from the same business domain. Slide57:  Model this final report from the same business domain. Slide59:  The full schema Slide60:  60 ORM Features, History, and Tool Support The Data Modeling Process ORM’s Graphical Language Comparison with ER and UML Case Study Relational Mapping and Tool Demos Slide61:  61 Conceptual Schema Relational Schema Rmap procedure generates 5th normal form by default. Relational Mapping Slide62:  62 Patient Allergy External (forms) and Logical (relational) schemas provide different structures for grouping elementary (conceptual) facts. Slide63:  63 Tool Demos Microsoft Visio ORM Source Model Solution NORMA Slide64:  64 Microsoft Visio for Enterprise Architects supports: Entry of ORM 1 schemas Forward engineering of ORM schemas to relational schemas Forward engineering of ORM updates to relational updates Direct entry of relational schemas Multiple styles for relational schemas (pure relational, IDEF1X, …) Reverse engineering of relational schemas to ORM schemas Report generation Slide65:  NORMA1 is the first tool to support ORM 2 Coded in C#, XML and XSLT Open source plug-in to Microsoft Visual Studio .NET 2005, utilizing Microsoft’s Domain Specific Language (DSL) toolkit. Supports entry of ORM 2 models Automated live error checking and verbalization Automatic transformation to implementation artifacts Can import ORM models from Visio (via free Orthogonal Toolbox) Currently pre-beta. A usable version for industry is expected in 2008 1 Public version downloadable from http://sourceforge.net/projects/orm. A newer build will soon be provided. See NORMA Labs 1-5 to start. NORMA (Neumont ORM Architect) 65 Slide66:  66 NORMA supports mappings to various implementation artifacts Slide67:  67 Main current limitations of NORMA Forward engineering to new schemas only (generation of incremental schema updates is coming) Verbalization of only about 75% of constraints (full verbalization expected early 2008) No reverse engineering (we have a basic prototype. RevEng expected in a 2008 release) Constraint code generation only for basics (ma, unique, value) (full code generation of graphic constraints expected late 2008) (code generation for formal textual constraints expected later) Future plans include complete application generation (including forms) ER, UML etc. views (editable) multi-model support (including model component reuse) integration with conceptual process modeling Slide68:  68 www.orm.net -- my ORM website www.ORMFoundation.net -- ORM Foundation website www.inConcept.com -- Journal of Conceptual Modeling, … www.ORMcentral.com -- COM API details for VEA, … www.objectrolemodeling.com/ -- Orthogonal Toolbox, … www.brcommunity.com/ -- Business Rules Journal articles Halpin, T. 2001, Information Modeling and Relational Database Design, Morgan Kaufmann. Halpin, T. et al. 2003, Database Modeling with Microsoft Visio for Enterprise Architects, Morgan Kaufmann. Further resources

Related presentations


Other presentations created by Carlton

Consumer
19. 11. 2007
0 views

Consumer

first06b
02. 10. 2007
0 views

first06b

Nyberg yeast
08. 11. 2007
0 views

Nyberg yeast

udd
10. 12. 2007
0 views

udd

Lab Setup
05. 11. 2007
0 views

Lab Setup

3 MOVE
06. 11. 2007
0 views

3 MOVE

drire
15. 11. 2007
0 views

drire

KRISTAL2006 04
20. 11. 2007
0 views

KRISTAL2006 04

DHCREALV2
22. 11. 2007
0 views

DHCREALV2

modern slow dance
23. 11. 2007
0 views

modern slow dance

Ethnic Geography Part II
23. 11. 2007
0 views

Ethnic Geography Part II

P Naming Elephants Presentation
26. 11. 2007
0 views

P Naming Elephants Presentation

ancientrome
31. 10. 2007
0 views

ancientrome

FarmtoBusiness
27. 12. 2007
0 views

FarmtoBusiness

Polymorphism
31. 12. 2007
0 views

Polymorphism

pruning avon landscape school
03. 01. 2008
0 views

pruning avon landscape school

Clinical
04. 01. 2008
0 views

Clinical

5 Unit 12
04. 01. 2008
0 views

5 Unit 12

WhittakerPaper
07. 01. 2008
0 views

WhittakerPaper

CEROS TechEnterprise 2005
07. 01. 2008
0 views

CEROS TechEnterprise 2005

ISU Trondheim 2006
07. 12. 2007
0 views

ISU Trondheim 2006

Parks Decsion Tree
28. 11. 2007
0 views

Parks Decsion Tree

deussen
02. 01. 2008
0 views

deussen

Onion handout only2006
07. 11. 2007
0 views

Onion handout only2006

SalahuddinAminuzzaman
25. 12. 2007
0 views

SalahuddinAminuzzaman

1 2006 parasitology definitions
24. 10. 2007
0 views

1 2006 parasitology definitions

mktrec
24. 02. 2008
0 views

mktrec

voyager tutorial
27. 02. 2008
0 views

voyager tutorial

MP10SpecialRelativit y2
06. 11. 2007
0 views

MP10SpecialRelativit y2

Maher Creativity 2007 08 14
28. 11. 2007
0 views

Maher Creativity 2007 08 14

Lifeline v4c
31. 10. 2007
0 views

Lifeline v4c

Travel Health
27. 03. 2008
0 views

Travel Health

Musical 1
02. 11. 2007
0 views

Musical 1

Outline2
13. 11. 2007
0 views

Outline2

wac2004ronblum
13. 04. 2008
0 views

wac2004ronblum

Agrofuels Driving Climate Change
26. 11. 2007
0 views

Agrofuels Driving Climate Change

2007 05 09bbh download
26. 10. 2007
0 views

2007 05 09bbh download

Bartenders Karen Palmersheim
11. 12. 2007
0 views

Bartenders Karen Palmersheim

Dynamic Licensing
06. 11. 2007
0 views

Dynamic Licensing

jose nov 04
30. 10. 2007
0 views

jose nov 04

1183379282 IIIA N S results
26. 10. 2007
0 views

1183379282 IIIA N S results

CLS Euro pres
02. 01. 2008
0 views

CLS Euro pres

cours5
01. 11. 2007
0 views

cours5

Homestake DOSSECC 6 2006b
03. 12. 2007
0 views

Homestake DOSSECC 6 2006b

ritt
29. 10. 2007
0 views

ritt

true fri pps2
28. 12. 2007
0 views

true fri pps2

27 Piro ops
30. 10. 2007
0 views

27 Piro ops

KUS5 trebilcock
01. 12. 2007
0 views

KUS5 trebilcock

Subsea experience 1
07. 11. 2007
0 views

Subsea experience 1

pred desvios
28. 12. 2007
0 views

pred desvios

Eric Van Heck
12. 12. 2007
0 views

Eric Van Heck