November 200291.3913 R McFadyen1 Aggregation and Composition – section 27.2 both are associations used to denote that an object from one class is part.

Slides:



Advertisements
Similar presentations
Object-oriented modeling Class/Object Diagrams
Advertisements

Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Text-Book Chapters (7 and 8) Entity-Relationship Model
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Jan 23, Ron McFadyen1 SSD for a samplePOS Use Case Figure 13.1 Input Events invoke a system operation of the same name same idea as in object-oriented.
Jan 2003Ron McFadyen Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a.
Feb 18, R McFadyen > An approach promoted by Martin Fowler in Analysis Patterns.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
1 Relationships Relationships will have justification in business rules, in the way the enterprise manages its business. The following figure illustrates.
Feb R. McFadyen1 From the Merriam-Webster’s online dictionary ( Main Entry: an·thro·po·mor·phism Pronunciation: -"fi-z&m Function:
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Feb 18, R McFadyen1 Feb 18, 2002 Review of some modeling concepts Introduction of Moment-Interval.
Review Questions What is data modeling? What is the actual data model that is created called? Data modeling is a technique for organizing and documenting.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
February Ron McFadyen1 From the Merriam-Webster’s online dictionary ( Main Entry: an·thro·po·mor·phism Pronunciation: -"fi-z&m.
Feb 4, Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – (interfaces,
Mar 20, R McFadyen1 Persistent Objects Persistent objects are objects that continue to exist after the application program terminates Persistence.
March 31, R McFadyen1 Persistent Objects Persistent objects are objects that continue to exist after the application program terminates Persistence.
MORE ON CLASS MODELS Lecture Outline Aggregation and composition Roles Navigability Qualified association Derived association Constraints Association.
Chapter 2: Entity-Relationship Model (Continued)
Fall 2009ACS-3913 Ron McFadyen1 From the Merriam-Webster’s online dictionary ( Main Entry: an·thro·po·mor·phism Date: 1753 an interpretation.
Designing with Interaction and Design Class Diagrams Chapters 15 & 16 Applying UML and Patterns Craig Larman With some ideas from students in George Blank’s.
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
CSSE 374: Domain Model Refinements and Iteration 3 Preparations Q1 These slides and others derived from Shawn Bohner, Curt Clifton, Alex Lo, and others.
CS 405G Introduction to Database Systems
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Computing & Information Sciences Kansas State University Wednesday, 01 Oct 2008CIS 560: Database System Concepts Lecture 15 of 42 Wednesday, 01 October.
Data Modeling with ER Diagrams What is an Entity-Relationship Model? How is an E-R model represented as an E-R diagram? How can a video store be modeled.
Lawrence ChungCS6359.0T1: Module 41 Module 4: Relationships.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
R McFadyen Chapter 7 Conceptual Data Modeling.
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
INFO 620Lecture #81 Information Systems Analysis and Design Class Diagram Refinement INFO 620 Glenn Booker.
Chapter 9 Applying UML and Patterns -Craig Larman
Sept Ron McFadyen1 Class Diagram Begins as a conceptual or analysis class model and evolves to a design class model Used throughout the development.
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.
Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a more specific kind of thing (the.
Class and Sequence diagrams UML notation SE-2030 Dr. Mark L. Hornick 1.
Design Model Lecture p6 T120B pavasario sem.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
advanced data modeling
Data Modeling Using the Entity-Relationship (ER) Data Model.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
UML Class Diagram notation Indicating relationships between classes SE-2030 Dr. Mark L. Hornick 1.
UML Part 1: Class Diagrams. Introduction UML stands for Unified Modeling Language. It represents a unification of the concepts and notations presented.
Sept 2004Ron McFadyen Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a.
2007ACS Ron McFadyen1 Aggregation and Composition both are associations used to denote that an object from one class is part of an object of another.
Class Diagram Lecture # 1. Class diagram A Class Diagram is a diagram describing the structure of a system shows the system's classes Attributes operations.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
BTS430 Systems Analysis and Design using UML Domain Model—Part 3: Association Classes.
Kyung Hee University Class Diagramming Notation OOSD 담당조교 석사과정 이정환.
Oct 3, Ron McFadyen1 GRASP Patterns 1.Expert 2.Creator 3.Controller 4.Low Coupling 5.High Cohesion.
Jan 2005Ron McFadyen Qualified Associations ProductCatalogueProductDescription A one to many association can be altered in a diagram to a one.
Topic 3: ER – Entity Relationship Model (ERM) 6/12/
Sept Ron McFadyen1 Include Relationship UC1:Process Sale … Main Success Scenario … 7. Customer pays and System handles payment. … Extensions.
CSIS 115 Database Design and Applications for Business
EKT472: Object Oriented Programming
Entity-Relationship Model
Domain Model Refinement
UML Class Diagrams: Basic Concepts
Understand and Use Object Oriented Methods
Chapter 7: Entity-Relationship Model
Relationships Relationships will have justification in business rules, in the way the enterprise manages its business. The following figure illustrates.
Information System Design
a generalization is a relationship between a general thing (the
Page 37 Figure 2.3, with attributes excluded
Presentation transcript:

November R McFadyen1 Aggregation and Composition – section 27.2 both are associations used to denote that an object from one class is part of an object of another class ProgrammeCourse An example of Aggregation: a course is part of the 4-year programme. The same course could be part of several programmes “Relational Application Development” is part of both the “3- Year” and the “4-Year” programmes *

November R McFadyen2 Aggregation and Composition BoardSquare Composition is similar to, but stronger than aggregation. If you specify composition, then you are saying that one object owns its parts. A Board is made up of several Squares. A Square will belong to just one Board. If a Board is deleted, then its Squares are deleted too. *

November R McFadyen3 Aggregation and Composition InvoiceInvoiceLine Consider Invoices and their Invoice Lines Question: Is the association aggregation or composition? ? ? *

November R McFadyen4 Association Classes (Section 27.1) In a typical university: We have a Course class and a Student class. A Student enrolls in an Course and is eventually assigned a grade. A Student may enroll in several Courses. A Course will have many Students enrolled. Consider : StudentCourse ** Where is the student’s grade kept? We can’t keep it with Student … nor with Course

November R McFadyen5 Association Classes StudentCourse ** Grade is considered an attribute that belongs to the association between a student and a course. If your model has a many-to-many association between two classes, then there will likely be a need for an association class Enrollment grade courseNum

November R McFadyen6 Association Classes StudentCourse ** Enrollment grade Suppose we have 3 students taking courses : courseNum studNum StudentCourse A A B C

November R McFadyen7 Association Classes StudentCourse ** Now suppose we need to track these grades over several terms we need to know what grades a student received for a course that was repeated more than once. The above model doesn’t accommodate this - there are different approaches (see section 27.3, next slide) Enrollment grade courseNum studNum

November R McFadyen8 Association Classes StudentCourse ** For a given combination of Student and Course, there is only one instance of Enrollment. The association class cannot keep track of history, only the most current association between a given student and a given course is kept. Enrollment grade courseNum studNum

November R McFadyen9 Association Classes StudentCourse ** We’ll look at two alternatives: Promotion of association class to class Using explicit notion of time Enrollment grade courseNum studNum

November R McFadyen10 Association Class – Promotion of association class to class Student Course ** Enrollment Grade Term courseNum studNum 11 Consider the following where the association class is promoted to a full class, and the association is replaced by two associations. permits the same course and the same student to be related several times Enrollment is promoted to a full-fledged class There are two associations now, instead of one

November R McFadyen11 Association Classes (including element of time) StudentCourse ** Associate a collection of Offerings with a course - each offering is associated with a particular time interval (in this case the time interval is duration of the term) Section 27.3 refers to a Moment-Interval archetype - a concept promoted by Peter Coad. The idea recognizes that some things that we need to track, either occur at a moment in time, or, they occur over an interval of time. (read section 27.3) Enrollment grade Offering courseNum term courseNum instructor studNum *

November R McFadyen12 Moment-Interval archetype Coad would indicate these types of classes with the designation: >, and, they would be coloured: > Offering term courseNum instructor > Offering term courseNum instructor Colour makes these kinds of classes stand out in a diagram. (See Java Modeling in Color with UML) Supposed to be pink

November R McFadyen13 From the text – section 27.3 Up till now, there has been only one price kept for a ProductSpecification. If there have been price changes, then getting the right subtotal could not be done correctly. Above: A SalesLineItem is related to a ProductSpecification which is associated with a collection of ProductPrice

November R McFadyen14 Roles (sections 27.5, 27.5) Store Manager * * Person 1 1 Figure Two approaches that are very similar Cashier Store manager Employs-to-manage Employs-to-handle-sales cashier worker manager 1 manages * Roles played in associations * * * manages 1 1 Employs Roles as concepts

November R McFadyen15 Reflexive Associations (section 27.8) child parent2 parent1 Person

November R McFadyen16 Reflexive Associations Would an association class be of any use here? Could subclasses be useful? What do we need to do if we need to keep track of history? marries husband wife **

November R McFadyen17 Packages Enrollment Student Course ** Enrollment grade courseNum studNum 11 See section (just the UML package notation on pages 425-6)

November R McFadyen18 Payments Package - Figure 27.23