Você está na página 1de 72

Modeling Methods

Modeling Methods
How to structure the problem?

The answer is just Simple, use MODELS

Model
Is a presentation of reality. Just a picture is worth a thousand of words, most system models are pictorial representations AN of reality. PL
SA R OO L EF L MP

Models
Logical Models
Show what a system is or does? Other names: Essential model Conceptual model Business model

Physical Models
Show not only what a system is or does? But also how the system is implemented. Other names: Implementation Model Technical model

Process Modeling
Process Modeling
Is a technique for organizing and documenting the structure and flow of data through a systems Processes , policies, and procedures to be implemented by a systems Processes.

Context Diagram
Illustrate the systems interface to the business and outside world, including other information systems.

Process Modeling
Context Diagram
Shows the major data flows into and from the application, and the system boundaries.

Member

Application

Admission card

Library System

Supplier System boundary Whole system as one process

Librarian

E.g. Context Diagram of a Library System

Process Modeling
Context Diagram
Shows the top level function defined to cover the scope of the application. It also shows the major data flows into and from the application, and the system boundaries. Top level function is then decomposed to its component functions (5-9 typically).

Process Modeling
Process Models
DFD (data flow diagram)

Data flow diagram (DFD)


DFD is a tool that depicts the flow of data through a system and the processing performed by that system.
Document Flow Diagram can be the er Ord Starting point
ice Invo

Purchasing Dept.

Supplier
Delivery notes

Stores

Process Modeling
Gane and Sarson Symbols Rounded rectangle Pay a bill
Represent processes or work to be done. E.g.: pay a bill, withdraw money, etc..

Bank

Square
Represent external agent. E.g.: bank, supplier, creditor, etc..

Process Modeling
Open end box
Bank Accounts Represent data store which is some times called files. E.g.: bank, supplier, creditor, etc..

Arrows
Represent data flows or input and output. E.g.: payment, bill, withdraw, etc
The above notation is called Gane and Sarson. There are several competing symbols set for DFDs.

Process Modeling
process
A process is work performed on, or in response to, incoming data flows or conditions.
Feed back 0 Input Payroll Hrs. 52, Rtae Rs.20 Output Salary Rs. 1040

Process Modeling
Process Decomposition
Is a act of breaking a system into its component subsystems, processes, and sub processes.
0 UCSC System

e of nt styl fere ms . are dif diagra There ition ompos dec

1 Payroll sub system 1.1 Process 1.2 Process

2 Registration sub System 2.1 Process

1.1.1
Sub Process

1.1.1.1 1.1.1.2

1.1.2
Sub Process

2.2 Process

Process Modeling
Process Decomposition
Advantages
Improved

Communication Analysis Design. Decomposition continues until the functions elementary level. (cannot be further decomposed) reach

Process Modeling
Example:
Consider a system in a bank whereby account holders get their withdrawals affected. Whenever an account holder wants to withdraw some cash, he presents a cheque or withdrawal slip. The account is checked for appropriate balance. If balance exists, the cash is paid and the account is updated.

Process Modeling
Process Description
The name of the process is insufficient to explain the logic to implement the process. Processes in the system specification should be specified in such a way that they can be converted to computer program.
Hey! Not enough tell more.

How can I?

I am Kamal.

Use process description methods.

Process Modeling
Process Description Methods of process description
Structured English Decision Tree If my IT marks more than 70 then grade is Distinction Decision Table Else if mark more than 40 then Pass
Else Fail

* >70 IT Subject

Distinction * >40 Pass

Fail

Process Modeling
Process Descriptions
Structured English Syntax is very similar to block structured languages. Example: IF credit limit exceeded THEN IF Customer has bad payment history THEN refuse credit ELSE IF PURCHASE ABOVE Rs.1000/= THEN refuse credit ELSE refer to manager ELSE allow credit

Process Modeling
Process Descriptions Decision Tree
Good payment History Credit limit exceeded Purchase below Rs.1000/= Refer to Manager Purchase above Rs 1000 Refuse credit

Bad payment history Credit limit not exceeded

Refuse credit Allow credit

Process Modeling
Process Descriptions
Decision Table
Co nd itio n
Credit limit exceeded Good payment history Purchase above Rs.1000/=

Y Y Y Y N N N N Y Y N N Y Y N N Y N Y N Y N Y N
X X X X X X X X

on Ac ti

Allow Credit Refuse Refer Manager

Y-TRUE N-NOT TRUE

X-TAKE ACTION

Better way of describing logic involving multiple condition

Process Modeling
Data flows
Data flows are the communication between processes and the system environment.

Data flow
Represent an input of data to a process or the output of data (or information) from a process

Data flow name

Data flow symbol Data flow names should be descriptive noun and noun phrases that are singular. E.g. Order not Orders

Process Modeling
Control flow
Represents a condition or non data event that triggers a process.
I have to get up @ 5.00 a.m.
Control flow name

Control flow symbol

Process Modeling
Illegal vs. legal data flow

B1

B2

B1

P1

B1

B1 DS1 B1 DS2

B1 DS1

P1 P1

DS1 B1

DS1

DS1

P1

DS1

Process Modeling
Example : DFD
Consider a system in a bank whereby account holders get their withdrawals affected. Whenever an account holder wants to withdraw some cash, he presents a cheque or withdrawal slip. The account is checked for appropriate balance. If balance exists, the cash is paid and the account is updated.

Process Modeling
Example Step 1 - Context Diagram
Account Holder Account Holder

Cheque/Withdraw al Slip

Withdrawal Acknowledge

Bank Payment System


Using Gane and Sarson, notation

Process Modeling
Example Step 2 - First Level DFD
1 Verify A/C Balance
Cheque/Withdrawal Slip Current Balance Valid Balance Withdrawal Acknowledge

Account Holder

New Balance

Account Holder

Account Master

2 Debit Withdrawal Amount

Data Modeling
A model is a representation of reality.
Logical model Logical functions describe any changes
of value made by the processes on logical data. Whereas logical functions more closely mirror the subject world. Logical DFDs only illustrate what occurs without showing how it occurs.

Physical model Physical-level functions are closer to the


usage world (real world). Usually a physical device is used to transform data. E.g. Computer, person, etc. Physical DFDs show things happen, or the physical components.

Data Modeling
Entity Relationship Diagrams
Depicts data in terms of the entities and relationships described by data. Entities An entity is something about which the business needs to store data. Synonyms entity type and entity class Example:

Employee

Paris

Ball

Payment

Concepts

Data Modeling
Entity Relationship Diagrams Entity:
is a class of

Persons

Places

Objects

Events

Concepts

about which we need to capture and store data. An entity instance is a single occurrence of an entity. Every entity must have an identifier or key to uniquely identify each instance.

Data Modeling
Entity Relationship Diagrams
Symbol: Consider Martin notations.

EMPLOYEE

DEPARTMENT

The named rounded rectangle represent the entity. A line represent the relationship.

Data Modeling
Entity Relationship Diagrams Attribute:
is a descriptive property or characteristics of an entity. Sometimes called as element, property, and field.
EMPLOYEE
NIC_NO Name Address Age . . .

A key is an attribute, or group of attributes that assumes a unique value for each entity instance. It is some time called an identifier.

This person can be identified using his ID number.

Data Modeling
Entity Relationship Diagrams Compound Attribute is one that actually consist of other
attributes. Synonyms- composite attribute, concatenated attribute data structure. Example : Address Street Address City Country Postal Code

Data Modeling
Entity Relationship Diagrams
The values for each attribute are defined in terms of three properties: 1. Data type What type of data can be stored in that attribute. 2. Domain What values an attribute can legitimately take on. 3. Default Is the value that will be recorded if not specified by the user.

Data Modeling
Entity Relationship Diagrams Relationships
Natural business association that exists between one or more entities May represent an event that links the entities or logical affinity that exits between the entities. E.g.. an EMPLOYEE assigns to a JOB
Assigns

Person married relation

EMPLOYEE

JOB

Data Modeling
Entity Relationship Diagrams
Cardinality Defines the minimum and maximum number of occurrences of one entity that may be related to a single occurrences of the other entity.
Exactly one

xa E

: le p

or
Person married relation

Data Modeling
Entity Relationship Diagrams
Cardinality
Zero or one
I might be married or not

Zero, one or more


I may have some friends or none

Data Modeling
Entity Relationship Diagrams Cardinality
One or more
I have to work at least one, or more projects.

More than one


I am working on many projects.

Data Modeling
Entity Relationship Diagrams Degree
Number of entities that participate in the relationship

Degree =1 Recursive Relationship Relationship that exists


between different instances of the same entity. Supervise EMPLOYEE

Data Modeling
Entity Relationship Diagrams Degree

Degree =2
Binary Relationship - When two different entities
participates in a relationship

DEPARTMENT

Works for

EMPLOYEE

Data Modeling
Entity Relationship Diagrams Degree PROJECT Degree =3 Ternary or 3-ary Relationship When more than two different entities participates in a relationship.
ASSIGNMENT EMPLOYEE

LOCATION

Object Modeling
Introduction
The object oriented approach differs from structured systems analysis and design. Thus, rather than modeling systems by data flows, E-R diagrams or process descriptions, all three components are integrated together into objects.

Object Modeling
Introduction
In Object Analysis you do not need to think in terms of building one large system. Instead we identify objects as independent entities having their own local goals. Such objects exchange messages between themselves to achieve a global goal of the large system.

Object Modeling
Introduction
What is an Object? Objects are the elements through which we understand the world around us. Objects have recognizable identities or properties (what it knows) and particular behaviors or methods (What an object does) These identities and behaviors enables us to recognize them as discrete things

Object Modeling
Human is an object
Behavior Smile Run Walk Etc
s bject o other e ck ar ti all, S B

Properties Skin tone Height Weight Etc

Object Modeling
Introduction
The object oriented approach differs from structured systems analysis and design. Thus, rather than modeling systems by data flows, E-R diagrams or process descriptions, all three components are integrated together into objects.

E-R Model Data model

Data flow

Object Modeling
Object-oriented analysis (OOA)
OOA is a technique used to: Reuse existing components Reuse Define new or modified objects that will be combined with existing objects

New

Modify

In order to produce useful business computing application.

Object Modeling
Object modeling (OM)
OM is a technique for identifying objects within the systems environment and the relationships between those objects. Class room Identified objects in class room

Teacher

Book

Etc Chair Student

Class

Object Modeling

A class is a set of objects that share common attributes and behavior. A class is sometimes referred to as an object class.

Book ISBN author type title copyright


Student Name Age Grade Smile ( ) Run ( ) Study ( )

Open() Close()

de u St

s la tC

ok Bo

s la C

Object Modeling
Generalization/Specialization
Person Name Age Gender Smile ( ) Run ( ) Eat ( )

Person

Teacher

Student

Generalization/specializa tion is a technique wherein the attributes and behaviors that are common to several types of object classes are grouped into their own class, called a supertype. The attributes and methods of the supertype object class are then inherited by those object classes.

Object Modeling
Generalization/Specialization
Person Name Age Gender Smile ( ) Run ( ) Eat ( )

Person

A class supertype is an object class whose instances store attributes that are common to one or more class subtypes of the object.

Teacher

Student

Object Modeling
Generalization/Specialization
Person Name Age Gender Smile ( ) Run ( ) Eat ( )

Person

A class subtype is an object class whose instances inherit some common attributes from a class supertype, and then add other attributes that are unique to an instance of the subtype.
Student

Teacher

Object Modeling
Generalization/Specialization
Example:
Supertype Subtype

Department

Staff Academic Staff Postgraduate

Student

Non Academic Staff

Under Graduate

Object Modeling
Department

Generalization/Specialization

Name ID T.P No: Address Approval() Sent() Receive()

Arrowhead indicates Generalization/ Specialization relationship

Staff Name ID T.P No: Address Submit() Sent()

Student Name ID T.P No: Address Schedule set() Lecture()

UML Representation of Generalization/Specialization

Object Modeling
Object/Class relationship
is a natural business association that exists between one or more objects/classes. Although objects can be developed independently of other objects, they also have a relationship to other objects. One such relationship is to use a link directly from one object to another : Association
1 Studies
1*

Class

Student

Example: There are many student in the each class

Object Modeling
Multiplicity
Multiplicity defines how many instances of one object/class can be associated with one instance of another object/class.

Library

1*

Books
g vin ha

s ook of b t a lo

e ll th A

y rar lib

Object Modeling
Multiplicity
Exactly one - 1
Employee Works for 1 Department I am working for one and only department

Employee

Works for

Department

1 or leave blank

Object Modeling
Multiplicity
Zero or more 0..*
Some customers are paying much but some are not

Customer

Makes

0..*

Payment

Customer

Makes

Payment

Object Modeling
Multiplicity
Zero or one 0..1
I am married

Employee

Has 0..1

Spouse I am not married

Object Modeling
Multiplicity
One or more 1..*
We offer one or more courses 1..* Course

University

Offers

Object Modeling
Multiplicity
Specific range 7..9
d le u ed ch s

We have to play 7 to 9 games in 2004

Team

as H

7..9

Games Game

In year 2004 BRAZIL have to play 7, 8, or 9 games Brazil 2004

Object Modeling
Aggregation Relationship
Composition Aggregation Relationship
1..* Book Chapter Black filled diamond

- Indicates Composition Aggregation Relationship


SA fo r D BI T

1..*
There are no books without chapter

Object Modeling
Aggregation Relationship
Shared Aggregation Relationship
Diamond without filled 0..* Team 0..* Player

0..*

Indicates shared Aggregation Relationship

Team may have Ronaldo or not

Object Modeling
Message
A Message is passed when one object invokes one or more of another objects methods to request information or some action.
Catch the cat

The catch message call catch() method of dog then the catch method automatically call the run method.

Dog can run & catch

Object Modeling
Polymorphism
It mean that the same named behavior may be completed differently for different objects. Polymorphism means many forms applied to object oriented technique.
sl id in g O pe n a do or

Object Modeling
Unified Modeling Language (UML)
Only a notation that is now widely accepted as a standard for object modeling.

UML Diagrams
Gives five different groups of diagrams to model a system. These deferent diagrams provides the development team a deferent perspective of the information system.
Example: Well known Housing industry where they use lot of diagrams.

FLOOR PLAN

ARCHITECTURAL PLAN

ELEVATION

Object Modeling
UML Diagrams Use Case Diagrams
Graphically describe who will use the systems and in what ways the user expects to interact with the system.

Object Modeling
UML Diagrams Class Diagrams
Shows object classes that the system is composed of as well as the relationship between those objects.

Object Modeling
UML Diagrams Object Diagrams
Similar to class diagrams, but instead of depicting object classes, they model actual object instances.

Provide snap shot of the systems objects at one point in time

Object Modeling
UML Diagrams Sequence Diagram
Graphically depict how object interact with each other via messages in the execution of a use case or operation.

Object Modeling
UML Diagrams Collaboration Diagrams
Similar to sequence diagrams but do not focus on the timing or sequence of messages. Instead they represent the interaction between the objects in a network format.

Object Modeling
UML Diagrams State Diagrams
Use to model the dynamic behavior of particular model. They illustrate an objects life cycle. During the life cycle the object can change to various states.

Object Modeling
UML Diagrams Activity Diagrams
Graphically depict the sequential flow of activities of either a business process or use case.

Object Modeling
UML Diagrams Components Diagrams
Used to graphically depict the physical architecture of the system.

Object Modeling
UML Diagrams Deployment Diagrams
Describe the physical architecture of the hardware and software in the system.

Você também pode gostar