IS390 Ch 4: Domain Modeling

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/63

encourage image

There's no tags or description

Looks like no tags are added yet.

64 Terms

1
New cards

What are “Things” in the problem domain

those items users work with when accomplishing tasks that need to be remembered (from the real world!)

  • Examples of “Things” are products, sales, shippers, customers, invoices, payments, etc.

  • These “Things” are modeled as domain classes or data entities

In this course, we will call them domain classes. In database class you may call them data entities

2
New cards

what is a problem domain

the specific area (or domain) of the users’ business need that is within the scope of the new system.

  • The context of which u are working

    Ex. if you are in sales, sales is ur domain



3
New cards

two techniques for identifying “things”

  • brainstorming technique

  • noun technique


4
New cards

brainstorming technique - basic def

Use a checklist of all of the usual types of things typically found and brainstorm to identify domain classes of each type

5
New cards

noun technique - basic def

Identify all of the nouns that come up when the system is described and determine if each is a domain class, an attribute, or not something we need to remember

  • identify problem domain classes (things) by finding, classifying, and refining a lits of nouns that come up in discussions or documents

  • Popular, systematic technique

  • CONS:

    • Does end up with long lists and many nouns that are not things that need to be stored by the system

    • Difficulty identifying synonyms and things that are really attributes

    • Good place to start when there are no users available to help brainstorm


6
New cards

types of things

Two Really Old Dogs Sleep Inside

<p><strong>T</strong>wo <strong>R</strong>eally <strong>O</strong>ld <strong>D</strong>ogs <strong>S</strong>leep <strong>I</strong>nside</p>
7
New cards

steps of brainstorming technique (full version)

1. Identify a user and a set of use cases

2. Brainstorm with the user to identify things involved when carrying out the use case—that is, things about which information should be captured by the system.

3. Use the types of things (categories) to systematically ask questions about potential things, such as the following:

  • Are there any tangible things you store information about?

  • Are there any locations involved?

  • Are there roles played by people that you need to remember?

4. Continue to work with all types of users and stakeholders to expand the brainstorming list

5. Merge the results, eliminate any duplicates, and compile an initial list

8
New cards

noun technique - steps (full version)

  1. Using the use cases, actors, and other information about the system, identify all nouns that might include: (product item, sale, confirmation, transaction, change request etc)

  2. Using other information from existing systems, current procedures, and current reports or forms, add items or categories of information needed. (ex. price, size color style season, quantity)

  3. as this list of nouns build, refine it, and decide what should be included (ex. is it a unqiue thing we need to know about? is it in scope? does system need to remember 1+ of these? Is it redundant? Is it acc an output or input?)

  4. Create a master list of all nouns identified then note wheather each one should be included, excluded or researched further

  5. review list with users, stakeholders, team members, and define the list of things in problem domain


9
New cards

attributes and values → relationship

  • Each instance of a class is an object which has its own values per attribute 

  • Building blocks for how we build data classes 


10
New cards

attribute

escribes one piece of information about each instance of the class

EX: Customer (class) has attributes: first name, last name, phone number, address

11
New cards

identifier or key

One attribute uniquely identifies an instance of the class. Required for data entities, optional for domain classes.

  • important for database reasons- ex. Linking tables

EX: A Customer ID (attribute) identifies a customer (class)


12
New cards

compound attribute

Two or more attributes combined into one structure to simplify the model. (E.g., address rather than including number, street, city, state, zip separately).

Sometimes an identifier or key is a compound attribute.

  •  ex. Address would have streets, state, zip all together instead of separately


13
New cards

association

a naturally occurring relationship between classes (a UML term)

  • How do we extend data classes to create relationships?

    • Ex. in retail with customer and orders, the customer would need to be linked with the order the customer made, and the order would be linked with items 


14
New cards

associations vs relationships

multiplicity vs cardinality

association = class diagram in UML

  • multiplicity = number of associations between classes: 1 to 1 or 1 to many

relationship = ERD database class

  • cardinality = number of relationships in entity relationship diagrams: 1 to 1 or 1 to many

Associations and Relationships can apply in two directions and can be read separately each way

EX: A customer places an order —> An order is placed by a customer


15
New cards

two ways to do class modeling

  • ERD and domain modeling are the two ways to do class modeling!


16
New cards

what is the concept of multiplicity/cardinality

the number of links that occur in a particular association between a thing(object) and one or more other things (objects)

How many of Object A connect to Object B?

  • Example: One Customer can place 0 to many Orders (a brand-new user hasn't ordered yet). But every Order must belong to exactly 1 Customer.


17
New cards

minimum and maximum multiplicity constraints

minimum is zero, the association is optional

If minimum is at least one, the association is mandatory

  • Ex. if you join a website but do not make an order, you need the ability to make an order = needs multiplicity/cardinality is zero or more

  • Ex. if mr smith places an order, you need the name of he order bc the order cannot process w/o knowing this = a 1 and only 1 mandatory relationship! 

  • Ex. if mr smith order 1 or more items = you need one or more mandatory relationship!


18
New cards

binary association

Associations between exactly two different classes

ex. Course Section includes Students

Members join Club

19
New cards

unary association (recursive)

Associations between two instances of the same class

ex. Person married to person

Part is made using parts

20
New cards

ternary association

association among three diff types of things

21
New cards

N-nary association

an association among any number of different types of things

22
New cards

ERD (entity relationship diagram)

term for “things” in ERD models

  • used for many years to develop data models that are used in database development

  • The term for “things” in ERD models is data entities

ERD models are not UML models and do not use standard UML notation

ERD models are not as expressive as UML models

  • They do not model generalization/specialization well

  • They do not model whole/part well


23
New cards

ERD notation example

knowt flashcard image
24
New cards
<p>ERD notation types —&gt; fill in the blanks</p>

ERD notation types —> fill in the blanks

knowt flashcard image
25
New cards

expanded ERD with attributes example


26
New cards

semantic net

A semantic net is a graphical representation of an individual data entity and its relationship with other individual entities

  • shows specific objects that belong to a class or data entity and the links among them

It is often used to help understand and then develop an ERD model

<p>A semantic net is a graphical representation of an individual data entity and its relationship with other individual entities</p><ul><li><p>shows specific objects that belong to a class or data entity and the links among them</p></li></ul><p>It is often used to help understand and then develop an ERD model</p>
27
New cards

ERD for a bank with many branches - USE AS STUDY QUIZ

QUESTIONS:

What are the key fields?

How many accounts can a customer have?

How many branches can a customer be assigned to?

How many customers can a branch have?


Another example is shown in Figure 4-10. This ERD is for a bank that

has many branches. Each branch has one or more accounts. Each account is

owned by one customer and results in one or more transactions. There are a few

other issues to consider in the bank example. First, there is no data entity named

Bank. That is because the ERD shows data storage requirements for the bank.

There is only one bank. Therefore, there is no need to include Bank in the model.

This is a general rule that applies to ERDs. If the system were for state bank

regulators, then Bank would be an important data entity because there are lots

of banks under the state regulators’ jurisdiction.


Look again at the cardinality. Note that a customer must have at least

one account. The rationale for this is that the bank would not add a customer

unless he or she was adding an account. Note also that the branch can have zero

accounts. A branch might be added long before it opens its doors, so it is possible

that it is does not have any accounts. Additionally, there might be some branches

that do not have accounts, such as a kiosk at a university or airport. Note that

an account must have at least one transaction. The rationale is that opening a

new account requires an initial deposit, which is a transaction. It is important to

recognize that questions about the cardinality and minimum and maximum car-

dinality constraints need to be discussed and reviewed with stakeholders.

<p>QUESTIONS: </p><p>What are the key fields?</p><p>How many accounts can a customer have?</p><p>How many branches can a customer be assigned to?</p><p>How many customers can a branch have?</p><p></p><p>Another example is shown in Figure 4-10. This ERD is for a bank that</p><p>has many branches. Each branch has one or more accounts. Each account is</p><p>owned by one customer and results in one or more transactions. There are a few</p><p>other issues to consider in the bank example. First, there is no data entity named</p><p>Bank. That is because the ERD shows data storage requirements for the bank.</p><p>There is only one bank. Therefore, there is no need to include Bank in the model.</p><p>This is a general rule that applies to ERDs. If the system were for state bank</p><p>regulators, then Bank would be an important data entity because there are lots</p><p>of banks under the state regulators’ jurisdiction.</p><p></p><p>Look again at the cardinality. Note that a customer must have at least</p><p>one account. The rationale for this is that the bank would not add a customer</p><p>unless he or she was adding an account. Note also that the branch can have zero</p><p>accounts. A branch might be added long before it opens its doors, so it is possible</p><p>that it is does not have any accounts. Additionally, there might be some branches</p><p>that do not have accounts, such as a kiosk at a university or airport. Note that</p><p>an account must have at least one transaction. The rationale is that opening a</p><p>new account requires an initial deposit, which is a transaction. It is important to</p><p>recognize that questions about the cardinality and minimum and maximum car-</p><p>dinality constraints need to be discussed and reviewed with stakeholders.</p>
28
New cards

Domain model class diagram

class

domain class

class diagram

Class

  • A type of classification used to describe a collection of objects

Domain Class

  • Classes that describe objects in the problem domain

Class Diagram

  • A UML diagram that shows classes with attributes and associations (plus methods if it models software classes)

Domain Model Class Diagram

  • A class diagram that only includes classes from the problem domain, not software classes so no methods


29
New cards

UML class notation

  • domain class a name and attributes (no methods)

  • class name always capitalized

  • attribute names not capitalized and use camelback notation (words run together and second word is capitalized)

  • Compound class names also use camelback notation


30
New cards
<p>UML notation for multiplicity —&gt; check what this actually MEANS</p><p></p>

UML notation for multiplicity —> check what this actually MEANS



<p></p>
31
New cards

association class

an association that is treated as a class in a many to many association because it has attributes that need to be remembered

(ex. such as grade in classroom-student-course)

32
New cards

association class properties

what is the key of the association class

The association class is the same “thing” as the association itself

The unique identifier (key) for the association class is the concatenation of the keys of the attached classes

  • In the previous example the key for CourseSection is CourseNumber+SectionNumber

  • Hence the key for CourseEnrollment is CourseNumber+SectionNumber+StudentID

  • Note: If more information is required to uniquely identify instances of the association class, then the model is incorrect, i.e., if the key cannot be formed by the concatenation of the endpoint keys, it is in error.


33
New cards

band members and concerts UML class diagram questions

in slides for ch 4

34
New cards

generalization/specialization

hierarchical relationship where subordinate classes are special types of the superior classes.

Often called an Inheritance Hierarchy

35
New cards

Superclass

the superior or more general class in a generalization/specialization hierarchy

36
New cards

subclass

the subordinate or more specialized class in a generalization/specialization hierarchy

37
New cards

Inheritance

the concept that subclasses classes inherit characteristics of the more general superclass

38
New cards

example of generalization/specialization


<p></p>
39
New cards

abstract class

a class that allow subclasses to inherit characteristics but never gets instantiated. In Italics (Sale)


40
New cards

concrete class

a class that can have instances


41
New cards

inheritance indicator

the ARROW indicates the class inherits from the one being pointed from

attributes of OnlineSale are:

  • timeOnSite, chatUse, saleDateTime, priorityCode, S&H


42
New cards

Whole-part relationship

a relationship between classes where one class is part of or a component portion of another class

43
New cards

Aggregation

what symbol is it indicated by

a whole part relationship where the component part exists separately and can be removed and replaced (UML diamond symbol on next slide)

  • Computer has disk storage devices (storage devices exist apart from computer)

  • Car has wheels (wheels can be removed and still be wheels


44
New cards

composition

what symbol is it indicated by

a whole part relationship where the parts cannot be removed (filled in diamond symbol)

  • OrderItem on an Order (without the Order, there are no OrderIterms)

  • Chip has circuits (without the chip, there are no circuits)


45
New cards

are relationships the same as association?

NO

46
New cards

three types of relationships in class diagrams

Association Relationships

  • These are associations discussed previously, just like ERD relationships

Whole Part Relationships

  • One class is a component or part of another class

Generalizations/Specialization Relationships

  • Inheritance


47
New cards

what is object behaviour

Each class has objects that may have status conditions or “states”

Object behavior consists of the various states and the movement between these states

48
New cards

state

a condition during an object’s life when it satisfies some criterion, performs an action, or waits for an event

49
New cards

transition

the movement of an object from one state to another

50
New cards

state machine diagram

a diagram which shows the life of an object in states and transition

51
New cards

origin state

the original state of an object before it begins a transition

52
New cards

destination state

the state to which an object moves after completing a transition

53
New cards

pseudostate

the starting point in a state machine diagram. n

noted by a black circle

54
New cards

action-expression

some activity that must be completed as part of a transition

55
New cards

guard condition

a true/false test to see whether a transition can fire

56
New cards

state machiene diagram —> fill in the blank w/ an on/off button example


knowt flashcard image
57
New cards

concurrency in a state machiene diagram - 3 terms

concurrent states

path

concurrent paths

58
New cards

concurrent states

when an object is in one or more states at the same timep

59
New cards

path

a sequential set of connected states and transitions

60
New cards

concurrent paths

when multiple paths are being followed concurrently

ie. when one or more states in one path are parallel to states in another path

61
New cards

printer with concurrent paths example

knowt flashcard image
62
New cards

steps to create a state machine diagram

1. Review the class diagram and select classes that might require state machine diagrams

2. For each class, make a list of status conditions (states) you can identify

3. Begin building diagram fragments by identifying transitions that cause an object to leave the identified state

4. Sequence these states in the correct order and aggregate combinations into larger fragments

5. Review paths and look for independent, concurrent paths

6. Look for additional transitions and test both directions

7. Expand each transition with appropriate message event, guard condition, and action expression

8. Review and test the state machine diagram for the class

  • Make sure state are really state for the object in the class

  • Follow the life cycle of an object coming into existence and being deleted

  • Be sure the diagram covers all exception condition

  • Look again for concurrent paths and composite states


63
New cards

how to make a state machine diagram - summarized

Choose a single object class.

Identify the states and exit transitions

Identify concurrent paths

Identify additional paths

Build the State Machine Diagram

64
New cards

RMO example of all steps to make a state machiene diagram

in ch 4 slides 57 - 62