METAMODELING the core of MDE and modeling in general UML3-1 UML 1.class diagrams 2.object diagrams and constraints 3.metamodeling.

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

Visio 2007 for UML Tutorial. Overview The tutorial demonstrates how to use Visio 2007 to create UML diagrams. We will focus on five most widely used UML.
Chapter 6: Entity-Relationship Model (part I)
SEG4110 – Advanced Software Design and Reengineering TOPIC D Metamodelling.
Stereotypes Stereotypes provide the capability to create a new kind of modeling element. –They can be used to classify or mark modeling elements. –A type.
The Entity-Relationship Model
The Entity-Relationship Model Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY courtesy of Joe Hellerstein for some slides.
UML – Class Diagrams.
Databases Revision.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
ER Modeling An E-R model is a conceptual (or logical) data model that includes –Entity (classes) –Attributes of each entity –Relationship types between.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 5 Understanding Entity Relationship Diagrams.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
Copyright © 2004 Pearson Education, Inc.. Chapter 3 Data Modeling Using the Entity-Relationship Model.
SLIDE 1IS Fall 2002 Database Management: Discussion Session University of California, Berkeley School of Information Management and.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Common Mechanisms in UML
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Databases Dr. V.T. Raja Oregon State University. Databases – Part 1: Outline Introduction Data Hierarchy Traditional file management Terminology Database.
Wentao He Department of Computer Science University of Toronto Toronto, ON, Canada.
Chapter 41 Enhanced Entity-Relationship and Object Modeling.
Class Agenda – 04/04/2006 Discuss database modeling issues
IT 244 Database Management System Data Modeling 1 Ref: A First Course in Database System Jeffrey D Ullman & Jennifer Widom.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
Methods in Computational Linguistics II Queens College Lecture 7: Structuring Things.
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Architecture: Component and Deployment Diagrams Patrick Bailey Keith Vander Linden Calvin College.
Christoph F. Eick: Designing E/R Diagrams 1 The Entity-Relationship Model Chapter 3+4.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts UML UML: Unified Modeling Language UML has many components to graphically model different.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
1 Class Diagrams: Advanced Concepts. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are the most commonly used diagrams.
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.
 Entity-relationship models (ERM) Entity-relationship models (ERM)  Simple E-R Diagram Simple E-R Diagram  Weak Entity Weak Entity  Strong Entity.
© D. Wong Ch. 2 Entity-Relationship Data Model (continue)  Data models  Entity-Relationship diagrams  Design Principles  Modeling of constraints.
Entity-Relationship Model
 An entity-relationship diagram (ERD) is a specialized graphic that illustrates the interrelationships between entities in a database.
Using COMET with Visio Visio UML Modeling. Creating a Drawing After opening Visio, you will see a list of templates available.
Design Jon Walker. More UML ● What is UML again?
Chapter 3 Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Databases Illuminated Chapter 3 The Entity Relationship Model.
INFORMATION NETWORKING MODEL DSL James McAvoy and Yifeng Li CSI Information Networking Model DSL 1 Winter Term
Seminar 10: OODB Design (Self-Study)
UML and Object Modeling Elements
Chapter 4 Extended Entity-Relationship (EER)Model Incorporates Set-subset Relationships Incorporates Generalization Hierarchies Constraints: Coverage Constraints:
Done By : Gillian Swaby. Objectives: 1. What is an Entity-Relationship Diagram? 2.What are the symbols used in ERD? Explain each. 3. What is a one- to-
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
Tutorial on E-R Diagrams 1.Learn basic terminology and symbols –See next four slides; refer to as needed in steps 2-4 below 2.Learn the basics of E-R diagramming.
OVERVIEW OF MDE AND IN CLASS EXAMPLES try your luck at modeling UML4-1 UML 1.class diagrams 2.object diagrams and constraints 3.metamodeling 4.examples.
Moya messam.  Definition: An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a.
Database Design, Application Development, and Administration, 6 th Edition Copyright © 2015 by Michael V. Mannino. All rights reserved. Chapter 5 Understanding.
Database -Entity-Relationship Model 2012/03/05.
High-level Database Models Prof. Yin-Fu Huang CSIE, NYUST Chapter 4.
A short revision on entity- relationship modelling.
A short review on entity- relationship modelling.
UML and Object Modeling Elements Longley et al., ch. 9 Zeiler, chs. 4 and 5, and 12 Review Zeiler ch. 1.
Entity-Relationship Model
Entity-Relationship Model
Model Driven Engineering
Entity-Relationship Modeling
MetaModeling the core of MDE and modeling in general UML
The Entity-Relationship Model
UML Diagramming with JUDE
Order Database – ER Diagram
What is a Relationship Map?
Understand and Use Object Oriented Methods
Chengyu Sun California State University, Los Angeles
Database Dr. Roueida Mohammed.
Presentation transcript:

METAMODELING the core of MDE and modeling in general UML3-1 UML 1.class diagrams 2.object diagrams and constraints 3.metamodeling

Terminology UML3-2 model meta-model

Examples A Java program that is syntactically-correct is an instance of a Java Language Metamodel if it is type-correct, it conforms to the Java Language Metamodel Example: 2 object instances and a model – only one instance conforms UML3-3

Perspective: Model to Instances You create a model M: And now you create instances that conform to the model Here are two instances collections of objects m1 and m2 Question: do m1, m2 conform to M? UML3-4 m1 m2

Perspective: Instances to Model You have a collection of instances, such as m1 and m2 What is a model M to which m1 and m2 conform? Called metamodeling UML3-5 m1 m2 M

MetaModels Here are 2 instances of a “graph”, which contains nodes and edges What is a class diagram of such graphs? UML3-6 n1n2 n6n8 n9 g1 g2

One Solution Model Java Representation UML3-7 class Node { private String Name; private Set edge; } class Edge { private node connects[2]; } What is “normalized” database design?

Hints on MetaModeling Here are 2 instances of another kind of graph called a UML Class Diagram For simplicity, there are no methods and there are any # of attributes, no inheritance relationships What is a UML class diagram to which these instances conform? UML3-8

Hint: Think Visio Drawing Tool Each “template” icon on left represents a class of objects dragging icon onto canvas creates an instance of that class so there are 2 classes of objects in a UML class diagram that we’re using 1.Determine attributes of each class 2.Determine relationships & constraints among classes UML3-9

Step 1: Identify Shapes Given instance: What are the shapes that you can drag onto a canvas? they are classes in your metamodel UML3-10

Step 2: Identify Attributes Given instance: What are the attributes of each of your classes? they may become classes in your metamodel, too UML3-11

Step 3: Identify Associations Look at model instance: Each AssociationEnd is anchored at connectedTo a Class box Yields metamodel MM UML3-12

Step 4: Beautify (Rename) Rename elements, add names to roles, etc. UML3-13

Step 5: Add Constraints Implied uniqueness constraints No two classes can have the same name Another constraint uniqueNames:-forall(findPair(_,_,N), isError('unique names constraint violated: ',N)). badAssocEnd(E):-associationEnd(E,_,_,_,C),not(class(C,_)). legalAnchor:-forall(badAssocEnd(E), isError('association end unbound: ',E)).

Note! Common for a metamodel to be an instance of itself! model MM conforms to MM Not an oddity! Requirement for advanced models make sure that you understand what this slide says! UML3-15 conforms to or is an instance of

Diagram-2-Table Mapping Notes UML3-16 Table#attributes class attributes assocEnd association Table#attributes classc#name attributes assocEnd association Table#attributes classc#name attributesat#namevisibility?attrOf assocEnd association Table#attributes classc#name attributesat#namevisibility?attrOf assocEndae#namevisible?cardinalityanchoredAtendOf association Table#attributes classc#name attributesat#namevisibility?attrOf assocEndae#namevisible?cardinalityanchoredAtendOf associationk#

Tabular Representation UML3-17 #Name clClass atAttributes aeAssocEnd asAssociation # k1 k2 k3 #NameVisibilityAttrOf a1name-cl a2name-at a3visibility-at a4name-ae a5visible-ae a6cardinality-ae #namevis?cardanchAtendof ae1attrOf-1clk1 ae2hasAttr-*atk1 ae3anchoredAt-1clk2 ae4anchors-*aek2 ae5endof-1ask3 ae6hasEnd-2aek3 Class Attributes AssocEnd Association c#name a#namevisibilityattrOf ae#namevis?cardanchAtendof k# Look at handout!

Your Turn: Entity-Relationship Model precursor to UML Class Diagrams Entity sets classes are boxes Entities can have attributes bubbles ; underlined attributes are keys Relationships are diamonds that connect 2 or more distinct boxes Attributes are associated with only one Entity UML3-18

A Solution UML3-19

#e#r# er1ewi er2dwi er3ddis er4udis #name wiworksin disdisciplines #name eEmployee dDepartment uUniversity A Solution UML3-20 Entity Relationship #namekey?belongsTo a1empNoyese a2agenoe a3deptNameyesd a4buildingnod a5phonenod a6addressnou a7nameyesu Attribute e#name a#namekey?belongsTo er#e#r# ERPair r#name