Você está na página 1de 33

Terms and Concepts

1
Terms and Concepts
 Advanced States and Transitions
– History States - Allows an object to remember which
substate was last active when the containing state
was exited.
 Upon re-entry to the containing state, the substate that
was last active will be re-entered directly.

2
History State Example

On

setToA
Preset A

setToB
Preset B
turnOff
setToB
Preset C

Off H
turnOn

3
History State Restrictions
 Transitions may only enter a history state from
outside the composite state
 Indicates the default reentered state if the
composite state has not yet been entered
 History states may not have internal transitions,
nested compartments, etc.

4
Terms and Concepts
 Advanced States and Transitions
– Concurrent Substates - Used when two or
more state diagrams are executing
concurrently within a single object.
 Allows an object to be in multiple states
simultaneously.
 The concurrent state diagrams within a “containing”
state must begin and end execution simultaneously.
 If one concurrent state diagram finishes first, it
must wait for the others to complete before exiting
the containing state.

5
Terms and Concepts

6
Concurrent Composite States

 The regions in a concurrent composite state


nested state compartment contain state
diagrams that execute in parallel.
 One state in each region is entered when the
concurrent composite state is entered.
 One state from each region is always among
the joint concurrent states until the concurrent
composite state is exited.
 Events cause transitions in each concurrent
region to occur simultaneously.
7
Concurrent Composite State Example

NormalOperation

after 40 sec after 5 sec


EW Green EW Amber EW Red

after 35 sec

after 45 sec after 30 sec


NS Red NS Green NS Amber

after 5 sec

8
Entering Concurrent Composite States

 Make a transition to the concurrent composite state


boundary
– The initial state in each region becomes the current state
 Make a transition to individual states in different
regions
– Main transition goes to a fork bar
– Transitions to individual state come from the fork bar
– A region without a state targeted by a transition begins
in its initial state

9
Entering Selected Concurrent States

Concurrent Composite State

S1 ...

Source transitionString
S2 ...
State

S3 ...

S4 ...

10
Leaving Concurrent Composite States
 Make a transition from the concurrent composite
state boundary
– For a non-completion transition, all concurrent sub-
states are exited immediately
– For a completion transition, the current state must be
a final state in every concurrent region
 Make a transition from one or more concurrent
sub-states
– Coordinated transitions can go to a join bar
– All other sub-states are exited immediately
11
Leaving Selected Concurrent States

Concurrent Composite State

... S1

... S2 ...
transitionString Target
State
... S3 ...

... S4

12
Concurrent
State
Diagrams
Using OMT
Notation

13
State Diagram for a Phone Line

14
Event Trace
for an ATM
Transaction

15
State Diagrams ATM, Bank, and Consortium

16
File Types
Files
 File is a collection of related records in which each
record contains related data fields.
 File is composed of records and fields.
 Record is collection of related data items.
 Field is a name given to each data item contained in
a record.
Types of File:
1. Master File
2. Transaction File
3. History File
4. Sort File
5. Backup File
18
Types Of Files
1. Master File: It includes data of permanent nature.
Employee salary file,inventory file and customer files
are master files.
2. Transaction File: It is temporary file used to
update master file.
3. History File: This file can be created for long-term
storage.
4. Report File: A file of information on auxiliary
magnetic tape or disk.
5. Sort File: A file having one or more fields in some
sorted order.
6. Backup File: A copy of file to ensure that data are
not lost if the original file is lost or damaged.

19
Master File
 A collection of records pertaining to one of
the main subjects of an information system,
such as customers, employees, products and
vendors.
 Master files contain descriptive data, such as
name and address, as well as summary
information, such as amount due and year-to-
date sales.
 A file that is relatively permanent and usually
updated periodically.
20
Transaction File
 A collection of transaction records.
 The data in transaction files is used to
update the master files, which contain the
data about the subjects of the
organization.
 Transaction files also serve as audit trails
and history for the organization.

21
Report File and Backup File
 Report File
– A file that describes how a report is printed.
 Backup File
– A computer file dedicated to storing and updating
computer backups.
– The branch of engineering science that studies
(with the aid of computers) computable processes
and structures.
– Report File is a file maintained in computer-
readable form.
22
Table File
 A TABLE file has a simple structure. There
are three kinds of records:
– COMMENT LINES begin with the character '#'
and are ignored.
– BLANK LINES are ignored, but could be used
by a particular program to indicate some
intending grouping or separation of records.
– COORDINATE LINES each contain one set of
point coordinates.
23
Files Management System
 It is the simplest type of program used to manage the
files.
 The software that manages the storage, access to,
retrieval from and use of flat files is called File
Management System (FMS).
 A flat file is a file that has no relationship with any
other file.
Advantages:
 Low purchase price
 Ease of operation and maintenance
 Low vulnerability to data errors.
Disadvantages:
 Flat files are independent and are not integrated.
 The same data are often duplicated in multiple files.
 Programs to manage data in multiple flat files at the dame
time are difficult to create and maintain.
24
Database Processing
 Database is collection of related and cross
referenced data designed and created to
minimize repetitions and ease manipulation
of data.
 How data is stored in databases:
 The data is stored in databases in one of
the three types of data structures:
1. Files

2. Tables

3. Objects

25
Databases
Advantages:
 Data redundancy reduced
 Data integrity improved
 Data independence maintained
 Data security improved
 Data consistency maintained
 More powerful manipulation of data allowed
 Easier data access and use
Disadvantages:
 Highly complex and require specialized programmers.
 Expensive in terms of hardware and software
 Massive destruction to data can occur if the security collapse.

26
Database Management
System(DBMS)
 It is software that manages the creation, storage,
access, updating, deletion and use of database.
 A DBMS has the following features:
1. Creates database by using information provided by
the designers
2. It provides programs to access, modify and
manipulate data in database.
3. Generation of report.
4. Security for database
5. Reports to management that who accessed
database and what activity was performed.
6. Automatic backup for data.
27
Kinds of DBMS
1. Single-user system with single application
database
2. Single-user system with multiple application
database
3. Multiple-user system with single application
database
4. Multiple-user system with multiple
application database.

28
Database Models
 4 types of database models:
1. Hierarchical Model
2. Network Model
3. Relational Model
4. Object-oriented Model

29
1. Hierarchical Model
 In this model the data
relationship follows
hierarchies, which reflect
either one to one relationship
or one to many relationship
among records.
 The uppermost record in tree
structure is called Root
Record.
 From there data is organized
into groups containing parent
records and child records.
 Relationship between the
data items follow defined
path so access to the data is
fast.
30
2. Network Model
 Similar to Hierarchical model
except that each record can
have more than one parent
thus creating many to many
relationship in the records.
 Main advantage of network
database is the ability to
handle sophisticated
relationship among various
records. therefore more than
one path can lead to desired
level.
 Data access is fast.

31
3. Relational Model
 Composed of many tables in which data are stored.
 Tables have unique rows and the cell has single
value.
 A database management system that allows the
data to readily created, maintained and manipulated
and retrieved from relational database is called
Relational Database Management System
 Database Query Language is helpful tool that acts as
an interface between users and RDBMS.
 2 basic query styles in relational database:
1. Query by example
2. Structured Query Language
 High cost

32
4. Object-Oriented Model
 It uses objects and messages to
accommodate new types of data and
provide for advance data handling.
 A system that allows objects to create,
manipulate, maintained and retrieved
from an object-oriented database is
called Object-oriented database
management system (OODBMS).
 It is used for applications which are
using complex data.

33

Você também pode gostar