Object Modeling (2) Chapter 3 (2) Part 1: Modeling Concepts Object-Oriented Modeling and Design Byung-Hyun Ha

Slides:



Advertisements
Similar presentations
Conceptual Data Modeling: ER
Advertisements

Text-Book Chapters (7 and 8) Entity-Relationship Model
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 4 Enhanced Entity-Relationship (EER) Modeling.
1 CSE491-RE: UML Classes The OO Solution The OO model closely resembles the problem domain –Base your model on the objects in the problem domain Iteratively.
7M822 UML Class Diagrams advanced concepts 15 September 2008.
Chapter 2: Entity-Relationship Model (Continued)
Entity-Relationship (E-R) Model
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
Database Design & ER Diagrams
The Entity-Relationship Model. 421B: Database Systems - ER Model 2 Overview of Database Design q Conceptual Design -- A first model of the real world.
1 Web-Enabled Decision Support Systems Entity-Relationship Modeling Prof. Name Position (123) University Name.
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model.
the Entity-Relationship Model
Entities and Attributes
Outline What is ER Model? And Why? Example COMPANY Database
Database System Concepts, 5th Ed. Chapter 6: Entity-Relationship Model.
Lawrence ChungCS6359.0T1: Module 41 Module 4: Relationships.
COP 3331 OBJECT-ORIENTED ANALYSIS AND DESIGN Bob Myers Department of Computer Science Week 6 Lecture.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
11 Software Engineering Dr. K. T. Tsang Lecture 7 Advanced class modeling
1 CSE 480: Database Systems Lecture 4: Enhanced Entity-Relationship Modeling Reference: Read Chapter 8.1 – 8.5 of the textbook.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
© Shamkant B. Navathe CC. © Shamkant B. Navathe CC Chapter 4 - Part I Enhanced Entity-Relationship and UML Modeling Copyright © 2004 Ramez Elmasri and.
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,
Unit 3 Conceptual Data Modeling. Key Concepts Conceptual data modeling process Classes and objects Attributes Identifiers, candidate keys, and primary.
7-1 © Prentice Hall, 2007 Week 5: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Entity-Relationship Model Using High-Level Conceptual Data Models for Database Design Entity Types, Sets, Attributes and Keys Relationship Types, Sets,
Object Modeling (1) Chapter 3 (1) Part 1: Modeling Concepts Object-Oriented Modeling and Design Byung-Hyun Ha
Chapter 11 & 12 Entity-Relationship (E-R) Model Characteristics of E-R Model Components of E-R Model Example of E-R Model Enhanced E-R Model.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
The OO Solution The OO model closely resembles the problem domain
Entity Relationship Diagram (2)
CH-4 Advanced class modeling. BookChapter N composed-of Booch BookChapter composed-of UML 1* Figure 2-7. Example of describing a model with two different.
Enhanced Entity-Relationship (EER) Modeling. Slide 4- 2 Chapter Outline EER stands for Enhanced ER or Extended ER EER Model Concepts Includes all modeling.
Entity Relationship Modeling
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Slide 3- 1.
Computing & Information Sciences Kansas State University Friday, 26 Sep 2008CIS 560: Database System Concepts Lecture 13 of 42 Friday, 26 September 2008.
Database Systems – ER Diagrams EXAMPLE COMPANY DATABASE Requirements of the Company (oversimplified to illustrate) The company is organized into DEPARTMENTs.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Modeling the Static Structure: Relationships ©SoftMoore ConsultingSlide 1.
Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 3: Data Modeling Using the Entity-Relationship (ER) Data Model
Slide 4-1 Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Revised by IB & SAM, Fasilkom UI, 2005 Exercise 1. a property or description.
Topic 4 - Part I Enhanced Entity-Relationship and UML Modeling
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
Lecture 26 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Enhanced Entity-Relationship and UML Modeling. 2.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 4- 1.
INTRODUCTION,MODELING CONCEPTS,CLASS MODELING | Website for Students | VTU - Notes - Question Papers | RESULTS | NEWS 1.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Lecture # 16 July 26,2012 Data Modeling using the Entity Relationship.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Lecture # 17 July 28,2012 Data Modeling using the Entity Relationship.
COP Introduction to Database Structures
Databases (CS507) CHAPTER 7.
Business System Development
Enhanced Entity-Relationship (EER) Model
Data Modeling Using the Entity- Relationship (ER) Model
Enhanced Entity-Relationship and Object Modeling Objectives
Session 2 Welcome: The sixth learning sequence
Visit for more Learning Resources
The OO Solution The OO model closely resembles the problem domain
Chapter 6: Entity-Relationship Model
Sampath Jayarathna Cal Poly Pomona
Cheng (Sp2001): Object-Oriented Development Overview
Presentation transcript:

Object Modeling (2) Chapter 3 (2) Part 1: Modeling Concepts Object-Oriented Modeling and Design Byung-Hyun Ha

Lecture Outline  Introduction  Links and associations  Advanced link and association concepts  Generalization and inheritance  Remaining parts

Introduction  Class and objects  A class is abstraction or specification of a group of similar objects  e.g. Person vs. Joe, Mary, …  e.g. Every instance of our Vector has x, y, and length(). Person (Person) Joe Smith 24 (Person) Mary Sharp 52 name: string age: integer public class Vector { double x; double y; double length() { double len = Math.sqrt(x * x + y * y); return len; }

Introduction  Association vs. links  An association is abstraction or specification of a group of similar links  e.g. Has-capital Country name City name Has-capital (Country) Canada (City) Ottawa Has-capital (Country) France (City) Paris Has-capital (Country) Senegal (City) Dakar Has-capital

Introduction  Association vs. links (cont’)  e.g. Intersects Line name Point name Intersects 2+

Links and Associations (cont’)  Multiplicity specification  How many instances of one class may related to a single instance of an associated class  One or many  Optional  Numbers PlayboyGirl loves RomanticistGirl loves BoyGirl loves 1+3-5

Links and Associations  Multiplicity depends on problem  e.g. tax collection application  e.g. auto workers’ union  It exposes hidden assumption built into the model PersonCompany Works-for PersonCompany Works-for

Advanced Link and Association Concepts  Role  One end of association  Role name  A name that uniquely identifies one end of an association PersonCompany Works-for employeeemployer UserDirectory container contents owner authorized user

Advanced Link and Association Concepts  Role name  All role names on the far end of associations attached to a class must be unique  The role name is a derived attribute of the source class  Role name for n-ary association  Association of degree 3 or more cannot simply be traversed from one end to another as binary associations can ProjectLanguage Person

Advanced Link and Association Concepts  Link attributes  Properties of a link in an association FileUser Accessible by access permission /etc/termcap(read)John Doe /etc/termcap(read-write)Mary Brown /usr/doe/.login(read-write)John Doe

Advanced Link and Association Concepts  Link attributes for one-to-many association  e.g. works-for and manages Person name social security no. address Company name address Works-for salary job title Manages worker boss performance rating

Advanced Link and Association Concepts  Folding link attributes  It is possible to fold link attributes for one-to-one and one-to- many associations into the class opposite the “one” site  How is it possible and which one is preferred? Person name social security no. address Company name address Works-for salary job title Person name social security no. address salary job title Company name address Works-for

Advanced Link and Association Concepts  Link attributes for ternary association PitcherYear Team wins losses WL Harry EisenstatCleveland Indians Harry EisenstatDetroit Tigers Willis HudlinCleveland Indians Willis HudlinCleveland Indians Willis HudlinWashington Senators Willis HudlinSt. Louis Browns194001

Advanced Link and Association Concepts  Modeling an associations as a class  Each link becomes one instance of the class  It is useful when links can participate in associations with other objects or when links are subject to operations UserWorkstation Authorized on Authorization priority privileges start session Director home directory

Advanced Link and Association Concepts  Ordering  A special kind of constraint WindowScreen Visible-on {ordered}

Advanced Link and Association Concepts  Qualification  A qualified association relates two object classes and a qualifier  The qualifier distinguishes among the set of objects at the many end of an association DirectoryFile DirectoryFile file name

Advanced Link and Association Concepts  Examples  Ticker symbol of company in stock exchange  Company and office Stock exchange Company ticker symbol lists Stock exchange Company ticker symbol lists CompanyPerson office officerorganization

Advanced Link and Association Concepts  Aggregation  “Part-whole” or “a-part-of” relationship  Used for components and assembly Existence of a part depends on existence of whole  Tightly coupled form of association extra semantics Transitivity If A is part of B and B is part of C, then A is part of C Antisymmetric If A is part of B, then B is not part of A Propagation of properties e.g. location of a door handle is obtained from the door; door obtains its properties from the car, … DocumentParagraphSentence

Generalization and Inheritance  Generalization  The relationship between a class and one or more refined version of it superclass and subclass  “is-a” relationship  Transitive ancestor and descendant An instance of a subclass is simultaneously an instance of all its ancestor classes Equipment name manufacturer weight cost PumpTank flow ratevolume …

Generalization and Inheritance  Examples  Fig and 3.24  Some guidelines  Do not nest subclasses too deeply  “An inheritance hierarchy that is two or three levels deep is certainly acceptable; ten levels deep is probably excessive; five or six levels may or may not proper”  Inheritance, generalization, and specialization  Different viewpoints of the same relationship  A subclass is a special case of its superclass  Don’t borrow a class using inheritance, when the new class is not really a special case of the original class!

Remaining Parts  Grouping constructs  Module and sheet  A sample object model  Fig. 3.25: object model for window system  Practical tips  …

Homework  HW7  Exercise 3.6 (p. 50)  HW8: extend E3.6 a.Modify the class diagram in Figure E3.6 (p. 51) so as to handle unary minus and functions (e.g., sqrt(x) for calculating square root of x) with arbitrary number of arguments. b.Prepare an instance diagram for the class diagram you made for the expression -(B + sqrt(B*B – 4*A*C))/(4*A*A).