Jan 21, 200291. 3913 Ron McFadyen1 Ch 10. Domain Model: Visualizing Concepts Domain model illustrated with a class diagram (with no operations defined)

Slides:



Advertisements
Similar presentations
Use Case - Example University library system requirements
Advertisements

Jan 16, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration 1: a simple cash-only success scenario of Process Sale.
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”
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Domain model: visualizing concepts
Data modelling uses two main techniques Entity relationship (E-R) modelling: a top- down approach Normalisation: a bottom-up approach.
NJIT 1 Domain Model Visualizing Concepts Chapter 9 Applying UML and Patterns Craig Larman.
Object-Oriented Development Process Part I: Requirement Gathering Warsun Najib Department of Electrical Engineering Gadjah Mada University.
Introductory case study. 2 The problem The most difficult part of any design project is understanding the task you are attempting You have been contacted.
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
9/18/011 Software Requirements Analysis and Design (Continued)
Domain Modeling Chandan R. Rupakheti and Steve Chenoweth Week 5, Day 1.
Software Engineering Case Study Slide 1 Introductory case study.
Use Case Diagram : Library System
CSSE 374: Design Class Diagrams Steve Chenoweth Office: Moench Room F220 Phone: (812) These slides and others.
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
Object-Oriented Analysis and Design
INFO 355Week #31 Systems Analysis II Domain Modeling INFO 355 Glenn Booker.
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’
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
DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
R McFadyen Chapter 7 Conceptual Data Modeling.
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.
Chapter 9 Domain Models $PH\06f522\LarmanApplUMLandPtrns\larman3EdDgmsCh01-14\09_domainModelsR2.ppt – RJL
Review ♦ System sequence diagram ♦ Domain model
Lecture 9 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Assignements. CSC343: Intro. to Databases2 Exercise 1 Superkeys: Candidate keys: Primary key:
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
1. Objectives At the end of this chapter you should be able to:  Discuss the use and features of a data model  Define the terms entity and attribute.
Copyright © Craig Larman All Rights Reserved The Domain Model.
DOMAIN MODEL- VISUALIZING CONCEPTS Identify conceptual classes related to the current iteration requirements. Create an initial domain model. Distinguish.
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
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
Conceptual Model or Domain Models Chapter10 Applying UML and pattern.
Sept Ron McFadyen1 Class Diagram Begins as a conceptual or analysis class model and evolves to a design class model Used throughout the development.
Elaboration Iteration 1- Part 1
2007ACS-3913 Ron McFadyen1 Class Diagram See Schaum’s UML Outline, especially chapters 4, 5, 6, 7.
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.
1 START AT 31 MARCH END 8 APRIL PHASE5(CONCEPTUAL AND SEQUENCE MODEL)
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.
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.
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
Normalisation Unit 6: Databases. Just to recap  What is an Entity  What is an Attribute?
Chapter 9 Domain Models.
Domain Model: Visualizing concepts
OO Domain Modeling With UML Class Diagrams and CRC Cards
ER MODEL Lecture 3.
OO Domain Modeling With UML Class Diagrams and CRC Cards
MIS2502: Data Analytics Relational Data Modeling
Object Oriented Analysis and Design Conceptual Model.
Lecture 8 Object Concepts
Domain Model: Visualizing Concepts
Presentation transcript:

Jan 21, Ron McFadyen1 Ch 10. Domain Model: Visualizing Concepts Domain model illustrated with a class diagram (with no operations defined) emphasis on real-world objects a visual dictionary a map of concepts in a domain contains (conceptual) classes from the problem domain associations attributes

Jan 21, Ron McFadyen2 Ch 10. Domain Model: Visualizing Concepts Domain model Bottom of Page 138 “ … the most common mistake when creating a domain model is to represent something as an attribute when it should have been a concept. “ If we do not think of some conceptual class X as a number or text in the real world, X is probably a conceptual class, not an attribute.

Jan 21, Ron McFadyen3 Identifying conceptual classes Linguistic analysis identify the nouns present in Use Cases and other descriptions Using analysis patterns (advanced) Analysis Patterns, Fowler 1995 Data Model Patterns, Hay 1996 Read these books (next year or so)

Jan 21, Ron McFadyen4 Identifying Classes Books and journals The library contains books and journals. It may have several copies of a given book. Some of the books are for short term loans only. All other books may be borrowed by any library member for three weeks. Members of the library can normally borrow up to six items at a time, but members of staff may borrow up to 12 items at one time. Only members of staff may borrow journals. Borrowing The system must keep track of when books and journals are borrowed and returned, enforcing the rules described above Noun Identification

Jan 21, Ron McFadyen5 Identifying Classes - candidate list library book journal copy of a given book short term loan library member week Member of the library item time member of staff system rule discard - outside scope discard - not an object (yet, anyway) discard - redundant see “Members of the library” discard - not a thing (here) discard - too vague, turns out to be book or journal discard - outside scope discard - part of the meta-language, not part of the domain discard - part of the meta-language

Jan 21, Ron McFadyen6 Identifying Classes - result book journal copy of a given book Member of the library member of staff Domain Classes The domain is the application area we are working in These classes describe our problem space Natural classes from the problem space the user can appreciate

Jan 21, Ron McFadyen7 Identifying Objects - result book journal copy of a given book Member of the library member of staff Class Diagram We can place these in a diagram and illustrate how they are related by creating the appropriate associations

Jan 21, Ron McFadyen8 A Class Diagram Book CopyLibraryMember MemberOfStaff Journal * * 1..* 1 is a copy of borrows/returns

Jan 21, Ron McFadyen9 Ch 10. Domain Model: Visualizing Concepts Flight destination arrival vs Flight destination arrival Airport Destination and arrival airports as attributes Destination and arrival airports as assocations Preferred

Jan 21, Ron McFadyen10 Specification (Description) conceptual classes P. 142: Include a specification class when we need a description of something irrespective of its existence deletions result in loss of information it reduces duplicated information Sale SaleLineItemProductSpecification

Jan 21, Ron McFadyen11 Specification (Description) conceptual classes - Airline Example Flight is a class that keeps track of flight number, date and time for a flight, departure and arrival airports. departs from arrives in arrival departure * *1 1 Flight number date time name address Regardless of the date/time of a flight, the number and the airports involved stay constant. Airport

Jan 21, Ron McFadyen12 Specification (Description) conceptual classes - Airline Example Flight date time Larman suggests the use of a Description/Specification Conceptual Class to hold these attributes - to avoid an anomaly relating to information disappearing due to objects being deleted. FlightDescription number * 1 departs from arrives in arrival departure * *1 1 name address Airport

Jan 21, Ron McFadyen13 Page 164: Focus on those associations for which knowledge of the relationship needs to be preserved for some duration “need-to-know” associations Avoid showing redundant or derivable associations Associations correspond to verbs expressing a relationship between classes objects do not exist in isolation - they fit together in some way

Jan 21, Ron McFadyen14 “need-to-know” associations Flight date time Our database needs to record, to keep track of, when flights are scheduled, where they fly from and to - I.e. we need to know (or be able to derive) this information. FlightDescription number * 1 departs from arrives in arrival departure * *1 1 name address Airport

Jan 21, Ron McFadyen15 no redundant associations departs from arrives in arrival departure Flight date time name address We can always derive the departure and arrival airports for a flight, so we don’t need to have these 2 redundant relationships Airport FlightDescription number * 1 * * 1 1 arrival departure

Jan 21, Ron McFadyen16 * 0..1 Page 158: “ a person can be Married-to only one other person at any particular moment, even though... Person is Married to ? Multiplicity

Jan 21, Ron McFadyen17 * 0..1 Page 158: “ the car is only Stocked-by one dealer... Car Stocked-by ? Dealer Multiplicity

Jan 21, Ron McFadyen Page 159: “ … The answer depends on our interest in using the model... Store Stocks ? Item Multiplicity *

Jan 21, Ron McFadyen19 Page 160: ? Person Supervises Multiplicity *

Jan 21, Ron McFadyen20 Pages 156, 162: “association checklist” typical ways in which associations arise A is physically contained in B … Section in a Book A is an organizational subunit of B … Faculty in a University etc Associations

Jan 21, Ron McFadyen21 P. 165 : Larman indicates that some of these may not be needed - not really part of the requirements - may not need-to- know all that are shown here Associations

Jan 21, Ron McFadyen22 attributes are preferably primitive (or just data types) boolean, date, number, string,... Invoice invDate: date Attributes

Jan 21, Ron McFadyen23 Non-primitive types where the associated things don’t need to be distinguished, such as phone number, quantities, points … the abstraction makes sense in the problem domain a phone number has many parts an item number that has subparts in its encoding price is a Currency amount is a Currency qty_ordererd is a Quantity these make sense in the problem domain price * qty_ordered makes sense Attributes

Jan 21, Ron McFadyen24 An Invoice will have a grand total Each Invoice Line will have a quantity ordered and a subtotal InvLine amount: Currency qty_ordered: Quantity Quantity amount: Number Invoice invDate: date amount: Currency Attributes Currency amount: Number

Jan 21, Ron McFadyen25 Page 172: No Foreign Keys as attributes in the Domain Model foreign keys are considered later in design example: an Invoice is not shown with an attribute for Customer; that is handled by the association between Customer and Invoice Invoice invDate: date Customer name: string address: string Attributes

Jan 21, Ron McFadyen26 Page 175: Derived attributes the UML notation is to prefix the attribute with a / SalesLineItem /quantity /subtotal Item 1..*0, 1 In this case, according to the model, there could be several items related to one line in the sale. These items are all the same type, and the quantity is therefore derivable by counting the number of related items. We are just adding more information to the model. Attributes

Jan 21, Ron McFadyen27 Video ID Stocks  Rents  Rents-from  * 1 * 1 * VideoStore address name phoneNumber Customer address name phoneNumber Video store example

Jan 21, Ron McFadyen28 VideoRental dueDate returnDate returnTime CashPayment amount : Money Video ID Stocks  Rents  Rents-from  Pays-for  Initiates  * * 1 * 1 * RentalTransaction date1 ** VideoStore address name phoneNumber Customer address name phoneNumber 1 Records-rental-of  Video store example More detail added:

Jan 21, Ron McFadyen29 title subjectCategory Video ID  Specification (Description) conceptual classes Where do we keep track of the title or other descriptions for things like the videos that are rented? ?

Jan 21, Ron McFadyen30 Catalog VideoDescription title subjectCategory Video ID Stocks  Owns-a  Described-by  1 1 * * * 1.. * VideoStore address name phoneNumber 1 Specification (Description) conceptual classes VideoDescription is a class that keeps track of the title and subject category for videos.