Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.

Slides:



Advertisements
Similar presentations
UML an overview.
Advertisements

Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
CS 340 UML Class Diagrams. A model is an abstraction of a system, specifying the modeled system from a certain viewpoint and at a certain level of abstraction.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Chapter 14 (Web): Object-Oriented Data Modeling
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Conceptual Data Modeling Using Entities and Relationships.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
7M822 UML Class Diagrams advanced concepts 15 September 2008.
Chapter 4: Object-Oriented Data Modeling
Chapter 2: Entity-Relationship Model (Continued)
Databases Illuminated Chapter 7 The Object-Oriented Model.
Chapter 14: Object-Oriented Data Modeling
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
Unified Modeling Language
Object-Oriented Analysis and Design
Chapter 41 Enhanced Entity-Relationship and Object Modeling.
Enhanced Entity Relationship Modeling © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Enhanced Entity Relationship Modeling Susan D. Urban and.
UML Diagrams Computer Science I.
Chapter 14: Object-Oriented Data Modeling
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.
Chapter 13 (Online): Object-Oriented Databases
UML Unified Modeling Language. What is UML? Unified Modeling Language (UML) is a standardized, general-purpose modeling language in the field of software.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
CHAPTER 13 (ONLINE): OBJECT-ORIENTED DATA MODELING © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
1 © Prentice Hall, 2002 Chapter 14: Object-Oriented Data Modeling Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
7-1 © Prentice Hall, 2004 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
7-1 © Prentice Hall, 2007 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
Unit 3 Conceptual Data Modeling. Key Concepts Conceptual data modeling process Classes and objects Attributes Identifiers, candidate keys, and primary.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 13 (Online): Object-Oriented Data Modeling Modern Database Management 10 th Edition.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Advanced UML Class Diagrams.
An Introduction to the Unified Modeling Language
Lecture 1: UML Class Diagram September 12, UML Class Diagrams2 What is a Class Diagram? A class diagram describes the types of objects in the system.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Object-Oriented Data Modeling
Object Oriented Analysis and Design Class and Object Diagrams.
Computing & Information Sciences Kansas State University Friday, 26 Sep 2008CIS 560: Database System Concepts Lecture 13 of 42 Friday, 26 September 2008.
advanced data modeling
Chapter 4 Extended Entity-Relationship (EER)Model Incorporates Set-subset Relationships Incorporates Generalization Hierarchies Constraints: Coverage Constraints:
1 Unified Modeling Language, Version 2.0 Chapter 2.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Chapter 3: Introducing the UML
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) Modern Database Management 11 th Edition Jeffrey A. Hoffer, V. Ramesh, Heikki Topi © 2013 Pearson.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
Data Modeling Using the Entity- Relationship (ER) Model
Modeling with UML – Class Diagrams
Object-Oriented Modeling
Business System Development
Systems Analysis and Design With UML 2
Entity-Relationship Model
UML Class Diagrams: Basic Concepts
Lec 3: Object-Oriented Data Modeling
Software Engineering Lecture #11.
Chapter 20 Object-Oriented Analysis and Design
Presentation transcript:

Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department of Computer Science and Engineering Arizona State University Tempe, AZ

Unified Modeling Language © 2002 by Dietrich and Urban2 OUTLINE Introduction to the UML standard. Comparison of UML and EER terminology. Overview of UML class diagrams. –Classes –Generalization and Specialization –Abstract Classes –Associations –Association Classes and Reified Associations –Navigability –Aggregation and Composition –Qualified Associations –Xor Constraints –Realization and Interfaces

Unified Modeling Language © 2002 by Dietrich and Urban3 UNIFIED MODELING LANGUAGE The Unified Modeling Language (UML) is a standard modeling language for object-oriented analysis and design. UML represents an integration of several analysis and design techniques. –Booch's Object-Oriented Notation –Rumbaugh's Object Management Technique –Jacobson's Object-Oriented Software Engineering Notation UML is part of the Object Management Group (OMG) standardization effort.

Unified Modeling Language © 2002 by Dietrich and Urban4 EXAMPLES OF UML DIAGRAM TYPES class diagrams - describes the types of objects and the relationship between objects. interaction diagrams - describes the collaboration of objects. package diagrams - groups classes together into higher- level units of abstraction. state diagrams - describes the possible states of an object and the changes in state in response to events. activity diagrams - describes the tasks that need to be done. deployment diagrams - describes the physical relationships between software and hardware components.

Unified Modeling Language © 2002 by Dietrich and Urban5 CLASS DIAGRAMS Data modeling in UML involves the use of class diagrams. Class diagrams are also known as static structural diagrams. Class diagrams are similar to EER diagrams, but differ in several ways: –Class diagrams offer more options for modeling relationships. –In addition to structural relationships, class diagrams support the modeling of behavior through the specification of operations on classes.

Unified Modeling Language © 2002 by Dietrich and Urban6 UML vs. EER TERMINOLOGY

Unified Modeling Language © 2002 by Dietrich and Urban7 UML CLASS NOTATION A UML class specification has three parts: –a class name –a list of attributes, defining the structural aspects of each class instance –a list of operations, defining the behavioral aspects of each class instance. FYI: A class name can be enhanced with a stereotype enclosed in guillemets ( « stereotype » ) above the class name. –A stereotype represents an extension to the UML semantics. –Example: the « persistent » stereotype indicates that a class is to be implemented as a database object.

Unified Modeling Language © 2002 by Dietrich and Urban8 UML CLASS EXAMPLE

Unified Modeling Language © 2002 by Dietrich and Urban9 OPERATION NAMING CONVENTIONS The following operations exist for all attributes: –getAttributeName to query the value of an attribute. –setAttributeName to assign the value of an attribute. In addition, the following operations exist for multi-valued attributes: –addAttributeName to add a value to a collection. –removeAttributeName to remove a value from a collection. Use other operation names as appropriate according to the semantics of the application.

Unified Modeling Language © 2002 by Dietrich and Urban10 ATTRIBUTE AND OPERATION SPECIFICATIONS Attributes and operations can be specified at different levels of detail, depending on the status of the design or the specific use of the class diagram. –Attributes and operations can be omitted. –Attributes and operations can be listed by name only. –Attributes and operations can be specified at a greater level of detail. [«stereotype»] [visibility] [/] attributeName [multiplicity]: [type] [= initialValue] [«stereotype»] [visibility] methodName( [parameterList]): [returnType]

Unified Modeling Language © 2002 by Dietrich and Urban11 OPERATION STEREOTYPES Operations can also have stereotypes to provide additional details about the functional use of an operation predefined stereotypes «create» - indicates that an operation is a constructor «destroy» - indicates that an operation is a destructor user-defined stereotypes «standardAccess» - indicates that an operation performs standard access and modification functions. Operation stereotypes are intermixed with operations, grouping operations by functionality.

Unified Modeling Language © 2002 by Dietrich and Urban12 VISIBILITY RULES FOR ATTRIBUTES AND OPERATIONS

Unified Modeling Language © 2002 by Dietrich and Urban13 MISCELLANEOUS NOTATIONAL CONVENTIONS Notes in the form of dog-eared rectangles can be attached to UML diagrams to provide additional information.

Unified Modeling Language © 2002 by Dietrich and Urban14 GENERALIZATION / SPECIALIZATION Subclasses are indicated using an open arrow pointing from the subclass to the superclass. No semantic difference between separate lines and tree form. Subclasses are disjoint by default. Separate arrowsTree form

Unified Modeling Language © 2002 by Dietrich and Urban15 CONSTRAINTS ON SPECIALIZATION Constraints on specialization are explicitly specified with curly braces ({…}) next to the specialization arrow

Unified Modeling Language © 2002 by Dietrich and Urban16 SPECIALIZATION EXAMPLE

Unified Modeling Language © 2002 by Dietrich and Urban17 ADDITIONAL SPECIALIZATION CONSTRAINTS Discriminator A disjoint specialization can be qualified with the use of a discriminator. A discriminator is an pseudoattribute of the superclass that determines membership in the subclass. The discriminator is specified as a label on the specialization link and does not appear in the list of attributes for the superclass. The superclass is an abstract class (i.e., a class that cannot be directly instantiated). Use of a discriminator implies disjoint and mandatory constraints on specialization.

Unified Modeling Language © 2002 by Dietrich and Urban18 DISCRIMINATOR EXAMPLE Type is a discriminator in the Project hierarchy that determines membership in the FilmProject or ModelingProject class.

Unified Modeling Language © 2002 by Dietrich and Urban19 MULTIPLE DISCRIMINATORS Multiple discriminators will always result in the use of multiple inheritance involving the discriminator subclasses.

Unified Modeling Language © 2002 by Dietrich and Urban20 ASSOCIATIONS Relationships Between Classes Associations can have names, role names, and multiplicities.

Unified Modeling Language © 2002 by Dietrich and Urban21 MULTIPLICITIES IN ASSOCIATIONS

Unified Modeling Language © 2002 by Dietrich and Urban22 1:1 ASSOCIATIONS

Unified Modeling Language © 2002 by Dietrich and Urban23 1:N ASSOCIATIONS

Unified Modeling Language © 2002 by Dietrich and Urban24 M:N ASSOCIATIONS

Unified Modeling Language © 2002 by Dietrich and Urban25 ASSOCIATION CLASS An association class is used when a relationship between objects has properties. The models relationship between Model and ModelingProject is modeled as the Paid association class.

Unified Modeling Language © 2002 by Dietrich and Urban26 A class can be created to represent a relationship and its attributes when pairs of objects in the relationship form a bag instead of a set. Multiplicities must be appropriately adjusted to model the relationship as a class rather than an association class attached to a relationship. REIFIED ASSOCIATIONS An Alternative to the Use of Association Classes

Unified Modeling Language © 2002 by Dietrich and Urban27 N-ARY ASSOCIATIONS N-ary associations model relationship among three or more classes. Lines extending from a diamond are used to connect the classes involved in an n-ary association. For a ternary association (A, B, C), the multiplicity on C defines the number of C objects that can be associated with a given (A, B) pair. Comment on this diagram now:

Unified Modeling Language © 2002 by Dietrich and Urban28 REIFICATION OF AN N-ARY ASSOCIATION Binary associations are preferred over n-ary associations since they are easier to understand. N-ary associations are typically implemented as multiple binary associations.

Unified Modeling Language © 2002 by Dietrich and Urban29 NAVIGABILITY Navigability determines the direction in which a relationship can be traversed. Binary relationships are by default navigable in both directions. An arrow can be added to one end of a binary relationship to indicate that it is uni-directional (i.e., the relationship can only be traversed in one direction).

Unified Modeling Language © 2002 by Dietrich and Urban30 NAVIGABILITY EXAMPLE ModelingProject navigates the relationship to access a Sponsor. Correct the arrow below, though. Sponsor does not store information about projects sponsored. In the Sponsor class, the function getProjectsSponsored can be implemented to determine projectsSponsored.

Unified Modeling Language © 2002 by Dietrich and Urban31 WEAK ENTITIES AS QUALIFIED ASSOCIATIONS An employee has many dependents. An employee has at most one dependent for a given dependent name. Every dependent must be related to an employee.

Unified Modeling Language © 2002 by Dietrich and Urban32 THE XOR CONSTRAINT The {xor} constraint can be used on two or more associations connected to a single base class to indicate that the instances of the class can only participate in one of the associations. The {xor} constraint can be used to simulate the concept of a category from the EER model. A lower bound of 0 on the base class side - partial category A lower bound of 1 on the base class side - total category

Unified Modeling Language © 2002 by Dietrich and Urban33 FYI: INTERFACES AND REALIZATION An interface is class that provides a name to a list of abstract operations, specifying the behavior that must be implemented in a concrete class. The implementation of an interface in a concrete class is referred to as a realization. An interface is denoted by «interface» stereotype above the interface name. An interface has no attributes and can only have associations with navigation that points into the interface. Realization is denoted by a dashed line with an arrow head pointing from the implementation class to the interface class. An interface can be a specialization of a higher-level interface.

Unified Modeling Language © 2002 by Dietrich and Urban34 FYI: INTERFACE EXAMPLE

Unified Modeling Language © 2002 by Dietrich and Urban35 FYI: THE INTERFACE ALTERNATIVE TO MULTIPLE INHERITANCE AND CATEGORIES A class is a subclass of only one superclass and realizes behavior of an interface class. A SelfEmployedPerson is a Person but can exhibit the behavior of a Business entity.

Unified Modeling Language © 2002 by Dietrich and Urban36 HOLLYWOOD UML CLASS DIAGRAM