DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,

Slides:



Advertisements
Similar presentations
Copyright Irwin/McGraw-Hill Data Modeling Prepared by Kevin C. Dittman for Systems Analysis & Design Methods 4ed by J. L. Whitten & L. D. Bentley.
Advertisements

Copyright ©2004 Cezary Z Janikow 1 Domain Model n Visualization of entities and relationships n In UP presented as Class Diagrams – Classes, Relationships,
Solving the Problem Analysis & Design.
1 Domain Model: Adding Attributes Chapter 12 Adding Attributes.
Jan 21, Ron McFadyen1 Domain Modeling Specification classes “need-to-know” associations Reflexive associations “association checklist”
1 Lecture 2: Elaboration Tasks and Domain Modeling.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Domain model: visualizing concepts
NJIT 1 Domain Model Visualizing Concepts Chapter 9 Applying UML and Patterns Craig Larman.
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 More on use cases System sequence.
Object Oriented Software Development Modelling business objects OOSAD Booklet Chapter 4 Lecture: Week 4 Brian Farrimond.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
9/18/011 Software Requirements Analysis and Design (Continued)
Domain Modeling Chandan R. Rupakheti and Steve Chenoweth Week 5, Day 1.
Object-Oriented Analysis and Design
Entity Relationship Model Chapter 6. Basic Elements of E-R Model Entity Object of the real world that stores data. Eg. Customer, State, Project, Supplier,
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
ระบบฐานข้อมูลขั้นสูง (Advanced Database Systems) Lecturer AJ. Suwan Janin Phone:
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
Object-Oriented Analysis and Design
What is a domain model? “A domain model captures the most important types of objects in the context of the business. The domain model represents the ‘things’
Relational Database Concepts. Let’s start with a simple example of a database application Assume that you want to keep track of your clients’ names, addresses,
Last lecture. What is a Use Case Use cases are stories (scenarios) of how actors use (interact with) the system to fulfill his goal. Examples Process.
Information Systems Analysis and Design Class Modeling
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
Chapter 9 Domain Models. Domain Modeling After you have your requirements you start modeling the domain. You are still modeling the business, not the.
TK2023 Object-Oriented Software Engineering CHAPTER 5 DOMAIN MODELLING.
Domain Modelling Presented By Dr. Shazzad Hosain.
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
DOMAIN MODE: ASSOCIATIONS, MULTIPLICITY AND ATTRIBUTE-TEXT NOTATION SYS466.
Review ♦ System sequence diagram ♦ Domain model
Lecture 9 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Jan 21, Ron McFadyen1 Ch 10. Domain Model: Visualizing Concepts Domain model illustrated with a class diagram (with no operations defined)
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
INFO 620Lecture #81 Information Systems Analysis and Design Class Diagram Refinement INFO 620 Glenn Booker.
Lecture 13-17, chitkara university.  Gives a conceptual framework of the things in the problem space  Helps you think – focus on semantics  Provides.
Chapter 9 Applying UML and Patterns -Craig Larman
Domain Model—Part 3: Associations, Multiplicity and Attribute- Text Notation.
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
SYS466: Analysis and Design Using OO Models Domain Class Diagram, Part 1.
Conceptual Model or Domain Models Chapter10 Applying UML and pattern.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Domain Model—Part 2: Attributes.  A logical data value of an object  (Text, p. 158)  In a domain model, attributes and their data types should be simple,
Repetition af Domæne model. Artifact influence emphasizing the Domain Model.
DOMAIN MODEL: ADDING ATTRIBUTES Identify attributes in a domain model. Distinguish between correct and incorrect attributes.
Object-Oriented Analysis and Design Feb 2, 2009.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2A: Attributes.
January Ron McFadyen1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain of interest.
Chapter 9: Domain Models.  The problem domain is modelled using a UML domain model: This is the first OO model that we will see (Use Cases are very useful.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
Chapter 16 UML Class Diagrams.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Larman chapter 101 Domain Model: Visualizing concepts Larman chapter 10.
1 Object Oriented Analysis and Design Conceptual Model.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
1 Chapter 9: Conceptual Model Chapter 10, 11 & 12 in Applying UML and Patterns Book.
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
Elaboration popo.
Chapter 9 Domain Models.
Domain Model: Visualizing concepts
Chapter 16 UML Class Diagrams.
Conceptual Model.
OO Domain Modeling With UML Class Diagrams and CRC Cards
CHAPTER 1: THE DATABASE ENVIRONMENT AND DEVELOPMENT PROCESS
Object Oriented Analysis and Design Conceptual Model.
Domain Model: Visualizing Concepts
Presentation transcript:

DOMAIN MODEL— PART 2: ATTRIBUTES SYS466

Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person, place, thing). Use category lists Look for “patterns” (e.g. Order, OrderLine, etc.)

How do we discover attributes initially? Nouns found in the use case specifications which identify simple data types are used to create attributes.

Attributes A logical data value of an object  (Text, p. 158) In a domain model, attributes and their data types should be simple, such as Number or String.

Data Types Most common data types or attributes  Boolean  Date (or DateTime)  Number  Character  String (Text)  Time

Data Types Other Data Types which may or may not be used as attributes:  Address  Colour  Geometrics  Phone Number  Social Insurance Number  Universal Product Code  SKU  Postal Codes  Enumeration (Size=Small)

Class or Attribute? Primitive data type?  Probably an attribute Multiple occurrences?  Probably a class (e.g. Part) More complex?  Could be a class Do we want to reuse it? (e.g. Address)  Could be a class

Objects as Attributes Sometimes more complex “things” are properties of classes  Address object (e.g. address:Address)  Group of part objects (e.g. partSet:Part)  Group of credit card objects (e.g. creditCardSet:CreditCard)

When to use Data type classes “Represent what may initially be considered a number or string as a new data type class in the domain model if” it  Is composed of separate sections  Phone number, address  Has operations associated with it such as parsing or validation  Social insurance number, credit card number  Has other attributes  Sales price could have a start (effective) date and an end date

Example of a data type class OR A data type class

When to use data type classes (continued) “Represent what may initially be considered a number or string as a new data type class in the domain model if” it:  is a quantity with a unit  Payment amount has a unit of currency  Is an abstraction of one or more types with some of these qualitities  Item identifies in the sales domain is a generalization of types such as Universal Product Code (UPC)

Quantity Most numeric quantities should not be represented as plain numbers. Consider price or weight. Saying “the price was 13” or “the weight was 37” doesn't say much. These are quantities with associated units, and it is common to require knowledge of the unit to support conversions.

Quantity

Attributes vs Classes GUIDELINE: If we DO NOT think of a conceptual class as text or a number in the real world then it is probably a class, not an attribute  e.g. a sale is made at a store  Sale is a conceptual class because in the real world the term suggests a legal entity, an organization or something that occupies space

Description Classes A description class contains information that describes something else  E.g., a ProductDescription records price, picture, and text description of a product

Description Classes Common in sales, product, and service domains In manufacturing which requires a description of a manufactured item that is distinct from the thing itself.

Description Classes Use a description class when:  There needs to be a description about an item or service, independent of the current existence of any examples of those items or services.  Deleting instances of things they describe (for example, Item) results in a loss of information that needs to be maintained, but was incorrectly associated with the deleted thing.  It reduces redundant or duplicated information.  Example: ProductDescription

Report Objects Not generally useful since information can be derived from other sources which is why you do not have create report use cases.

Report Objects Shown if they have a special role in terms of business rules—e.g. need Receipt in order to get refund—then they should be included

A Few Final Thoughts In the domain Model  Relate conceptual classes with an association, NOT an attribute  Cashier to Register  NOT currentRegister attribute of Cashier  Attributes should preferably be “data type”, not complex concepts  Flight to Airport  NOT destination attribute of Flight

Fig. 9.23

Objects as Attributes Sometimes “which object is an attribute of which other object” is not clear. We need to go to the business for more information.  E.g. Customer to Order (in Charlene’s Cakes)  We make the customer object an attribute of Order because Order is meaningless without Customer (To whom do you deliver the baked goods? Who pays?)  We may retrieve orders in several ways—by unpaid, by date, by customer etc. If we put order into customer, which orders would we give customer? Customer can exist very nicely without Order.

Handling Groupings of Objects Sometimes we use temporary lists/sets etc. in order to store retrieved objects. The use case “controller” class (the class that holds the business logic) might look after this. Sometimes classes themselves contain groupings of objects:  E.g. contactSet:ContactPerson is a grouping of contact people(perhaps an array list) in Supplier

Attributes in Supplier class using the Rose icon for private & SYS466 conventions As a convention, most modelers will assume attributes have private visibility

Classes versus Database Not the same thing Classes do not have “foreign keys”. Think object. E.g. You would NOT model custID as an attribute of Order; but you might model customer:Customer as an attribute of Order.

Do not use attributes as foreign keys Attributes should not be used to relate conceptual classes in the domain model. Do not add a kind of foreign key attribute, as is typically done in relational database designs, in order to associate two types.

Figure 9.25

Acknowledgement Slide material was taken from Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development, Third Edition, By Craig Larman, Published by Prentice Hall, Pub. Date: October 20, Chapter 9