logging in or signing up Sep 20 15 01 DASSUG Dr Terry Halpin ORM 09 07 Carlton Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINTLite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: Embed: Flash iPad Dynamic Copy Does not support media & animations Automatically changes to Flash or non-Flash embed WordPress Embed Customize Embed URL: Copy Thumbnail: Copy The presentation is successfully added In Your Favorites. Views: 192 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: November 30, 2007 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... By: akarasan (31 month(s) ago) Thank You. Saving..... Post Reply Close Saving..... Edit Comment Close Premium member Presentation Transcript Model Driven Developmentwith ORM 2 and NORMA: 1 Model Driven Development with ORM 2 and NORMA © 2007 T. Halpin & Neumont University Terry Halpin Neumont University email@example.com www.orm.netSlide2: 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) 6Slide7: 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 8Data 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 9Analysis 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 10Slide11: 11 Data (uninterpreted syntax) The Patient with Patient# ‘571’ has a Temperature of 100 oF Fact (proposition taken to be true) Information = data + semantics 571Slide12: 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 FactsThe 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 14Slide15: 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 cycleSlide16: 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 needsSlide17: 17 Conceptual schema design procedureSlide18: 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. 19Slide20: 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. 20Slide21: 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-derivedSlide29: 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. 29Slide30: 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. 30Slide31: 31 e.g.Slide32: 32 Object Value Constraints Role Value ConstraintsSlide33: 33 Subset ConstraintsSlide34: 34 Equality ConstraintsSlide35: 35 Exclusion Constraints Exclusive-Or ConstraintsSlide36: Subtyping 36Slide37: Frequency Constraints 37Slide38: Ring Constraints 38Slide39: The previous constraints are all alethic (necessarily true for each state). ORM 2 also supports deontic versions of all these constraints 39Slide40: 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 ValidationSlide41: 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 modalitiesSlide44: 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 multiplicitySlide47: 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 stabilitySlide49: 49 List titled people and their gender üPerson --- has Title --- is of üGender select SSN, gender from Person where title is not nullSlide50: 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.SSNSlide51: 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 schemaSlide60: 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 MappingSlide62: 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 NORMASlide64: 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) 65Slide66: 66 NORMA supports mappings to various implementation artifactsSlide67: 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 You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.