Domain Modelling
Domain Modelling
Dr Kristin Stock
Questionnaires,
Interviews, JAD, etc.
Root Cause Analysis,
Problem Analysis, etc.
Techniques
Strategies
What Next?
Once weve looked at use cases and business
processes, we can start to think about the objects
involved in the domain
We often begin at a conceptual level, and then
work down adding more detail.
This session:
The basics of object modelling (classes,
relationships, attributes, operations)
Conceptual level modelling (modelling the domain)
Verifying and validating.
What is he
doing?
vs
What are the
things hes
doing it with?
Photo 2
Photo 1
http://
q.xorro.com/pndk
Objects and
Structural Modelling
Structural Models
Drawn using an iterative process
First drawn in a conceptual, business-centric way
Then refined in a technology-centric way
describing the actual databases and files
More and more detail is added in each iteration
Structural Models
Main goal: to discover the key data
contained in the problem domain and to
build a structural model of the objects
Structural
Modeling
Solution Domain
Problem Domain
High level.
Sketches out broad concepts.
Can work with users to define high level concepts.
e.g. Concept Mapping.
is in
house
is in
street
city
Classes
In a class diagram, the objects in the system
(concepts in the conceptual model) are
represented as classes.
A class is a group of individual objects.
E.g. the class road, person, customer, cake.
In UML, we create class diagrams to show the
classes involved in a system, and their
interactions.
Identifying Classes
We can identify classes from:
Conceptual model;
Use case diagram and description (nouns);
Brainstorming;
Workshops with users (esp. data intensive
systems);
Sometimes activity diagram may identify important
classes and groups of classes.
Domain Modelling
What is a domain?
The scope/sphere within
which the model is
created.
E.g. petroleum geology;
marine science
Usually our domain
models model a subset of
these that are relevant to
the problem we are
working on.
Attributes
Characteristics of a class.
Often in a textual descriptions, they
are adjectives (the red car, the
chocolate cake, the fast delivery).
It is not always clear whether
something should be modelled as
an attribute or a class:
Make it a class if it has other
attributes or operations of its own,
otherwise an attribute.
camelCase, singular
Operations
Things that can be done with/to a class, or its
own inherent behaviour.
Often in a textual descriptions, they are verbs
(bake a cake, sell a cake, deliver a cake).
Again, a word of caution some verbs are not
operations, but associations between classes.
Relationships
Associations between classes.
Indicate some link or dependency.
There are many kinds of associations, usually they
can be described with a verb (has, contains, is part
of, etc).
Should be able to read through the diagram with
classes and associations.
is in
house
is in
street
city
Example
House
streetNumber
houseType
buildDate
owner
rebuild
renovate
Street
is in
streetType
oneWay
suburb
Associations
Depicted with a line labeled with the name of
the relationship
May be directional (depicted with a triangle;
e.g., a patient schedules an appointment)
Multiplicities
Department
1
Child
Zero or more:
An employee has zero to
many children
Employee
One or more:
A boss is responsible for
one or more employees
0..*
Boss
1
Exactly one:
A department has one and
only one boss
Employee
1
Boss
1..*
Example
House
streetNumber
houseType
buildDate
owner
rebuild
renovate
Street
streetType
oneWay
suburb
is in
Example
House
streetNumber
houseType
buildDate
owner
rebuild
renovate
Street
is in
1
0..*
streetType
oneWay
suburb
Example
House
streetNumber
houseType
buildDate
owner
Street
is in
0..*
streetType
oneWay
suburb
rebuild
renovate
http://q.xorro.com/pndk
multiplicity
Object Diagrams
Class diagrams with instantiated classes
Example: instead of a Doctor class, create an
actual doctor, say Dr. Smith
Place values into each attribute
Activity diagrams.
Can a house
ever not be
in a street?
Iteration
The class diagram will evolve through the
analysis phase particularly.
Gradually we add more detail.
INSPIRE
INSPIRE
European Directive.
http://inspire.ec.europa.eu/
Develops standards and processes to share data
across 34 themes important for environmental
management, among 28 member states.
Protected Sites
Convened thematic experts from around
Europe.
Had workshops to identify relevant classes
and attributes.
Also several existing domain models in use
around Europe.
Summary
Structural Models
Classes, Attributes, Operations, Associations.
More detail on these next time.