Data and process analysis

1 Systems Analysis Data and process analysis ผูส้ อน ดร.สลิล บุญพราหมณ์ ITM-631 Information System Development 2 ... ความคิดนัน เป็ นแม่บทใหญ่ข...
33 downloads 1 Views 847KB Size
1

Systems Analysis Data and process analysis

ผูส้ อน ดร.สลิล บุญพราหมณ์ ITM-631 Information System Development

2

... ความคิดนัน เป็ นแม่บทใหญ่ของการพูดและการกระทํา เพราะกิจทีจ " ะทําคําที" จะพูดทุกอย่างล ้วนสําเร็จมาจากความคิด การคิดก่อนพูดและก่อนทํา จึงชว่ ยให ้บุคคลสามารถยับยัง คําพูดทีไ" ม่สมควร หยุดยัง การกระทําทีไ" ม่ถก ู ต ้อง ... พระบรมราโชวาทของพระบาทสมเด็จพระเจ้าอยูหั ่ ว ในพิธพ ี ระราชทานปริญญาบัตรของจุฬาลงกรณมหาวิ ทยาลัย ์ ๑๐ กรกฎาคม ๒๕๔๐

Chapter Objectives 3



Describe data and process modeling concepts and tools, including data flow diagrams, a data dictionary, and process descriptions



Describe the symbols used in data flow diagrams and explain the rules for their use



Draw data flow diagrams in a sequence, from general to specific



Explain how to level and balance a set of data flow diagrams

Chapter Objectives 4

 Describe how a data dictionary is used and what it contains  Use process description tools, including structured English, decision tables, and decision trees

 Describe the relationship between logical and physical models

Introduction 5

 In Chapters 5 & 6, you will develop a logical model of the proposed system and document the system requirements 

Logical model shows what the system must do



Physical model describes how the system will be constructed

Overview of Data and Process Modeling Tools 6

 Systems analysts use many graphical techniques to describe an information system

 A data flow diagram (DFD) uses various symbols to show how the system transforms input data into useful information

Data Flow Diagrams 7

 A data flow diagram (DFD)



shows how data moves through an information system but does not show program logic or processing steps A set of DFDs provides a logical model that shows what the system does, not how it does it

Data Flow Diagrams 8

 DFD Symbols

Data Flow Diagrams 9

 DFD Symbols 

Process symbol  Receives input data and produces output that has a

different content, form, or both  Contain the business  Referred to as a

logic, also called business rules

black box

Data Flow Diagrams 10

 สงิ" ทีค" วรทราบ  ชอื" มีความหมายชดั เจนในการอธิบายกิจกรรม เชน่ เพิม" รายวิชา หรือ produce report

 จะต ้องมีหมายเลขกํากับเสมอ  ชอื" process และหมายเลขจะซํ ากันไม่ได ้

Data Flow Diagrams 11

 DFD Symbols  Data

flow symbol

 Represents one

or more data items  The symbol for a data flow is a line with a single or double arrowhead

Data Flow Diagrams 12



Spontaneous generation



Black hole



Gray hole

Data Flow Diagrams 13

 สงิ" ทีค" วรทราบ 

ื" ของ Data flow จะต ้องเป็ นคํานามทีอ ชอ " ธิบายข ้อมูลเสมอ ่ รหัสหนังสอ ื นํ าหนักสน ิ ค ้า ข ้อมูลลูกค ้า เชน



ื" ข ้อมูลมากกว่า 1 ชอ ื" บนเสนเช ้ อ ื" มโดยใช ้ อนุโลมให ้เขียนชอ เครือ " งหมาย comma ชว่ ยแยก



ื" มโยง Data flow จะโยงให ้มีความเชอ ื" มต่อสมบูรณ์ การเชอ ่ งว่าง ไม่มช ี อ

Data Flow Diagrams 14

 DFD Symbols 

Data store symbol  Represent data that

the system stores  The physical characteristics of a data store are unimportant because you are concerned only with a logical model

Data Flow Diagrams 15

 สงิ" ทีค" วรทราบ

Data store อาจเป็ นการเก็บข ้อมูลในรูปแบบต่างๆกันก็ได ้ ่ สมุดลงนาม แฟ้ มเอกสาร หรือ computer file เชน  โครงสร ้างข ้อมูลทีเ" ก็บใน Data store หนึง " ๆจะมีรป ู แบบ เดียวกันทัง หมด  มีหมายเลขกํากับ และเลขเหล่านีซ ํ าไม่ได ้  ในการเขียน Data store จะต ้องมี diagram ทีแ " สดงว่า ้ นํ าเข ้ามูลเข ้า รวมทัง มีการนํ าข ้อมูลไปใชงาน 

16

Data Flow Diagrams 17

 DFD Symbols 

Entity Symbol  Name of

the entity appears inside the symbol  Terminators  Source  Sink

Data Flow Diagrams 18

 สงิ" ทีค" วรทราบ

ื" มโยง external entity ตรงๆไม่ได ้ เชอ ื" ม external entity กับ data store ไม่ได ้  เชอ 

Data Flow Diagrams 19

Data Flow Diagrams 20

Creating a Set of DFDs 21

 Create a graphical model of the information system based on your fact-finding results

 First, you will review a set of guidelines for drawing DFDs. Then you will learn how to apply these guidelines and create a set of DFDs using a three-step process

Creating a Set of DFDs 22

 Guidelines for Drawing DFDs 

Draw the context diagram so that it fits on one page



Use the name of the information system as the process name in the context diagram



Use unique names within each set of symbols  ชือ ่ เดียวกันหมายถึงสิ่ งเดียวกัน

Creating a Set of DFDs 23

 Guidelines for Drawing DFDs 

Do not cross lines



Provide a unique name and reference number for each process



Obtain as much user input and feedback as possible

Creating a Set of DFDs 24

 Step 1: Draw a Context Diagram

25

 ในการเขียน Context diagram 

ไม่ให ้มี Data store ใน context diagram



ั ลักษณ์ process ให ้มีสญ ได ้เพียงรูปเดียว



ไม่ควรเขียน External entity ซํ า



ไม่มล ี ก ู ศร 2 ทาง

26

กรณีทม ี" ากกว่า 1 data flow สามารถเขียน ้ รวบเสนได ้

Creating a Set of DFDs 27

 Step 2: Draw a Diagram 0 DFD

Creating a Set of DFDs 28

 Step 2: Draw a Diagram 0 DFD (cont) 

If same data flows in both directions, you can use a doubleheaded arrow



Diagram 0 is an exploded view of process 0



Parent diagram



Child diagram



Functional primitive

29

DFD Level 0

Context diagram

Creating a Set of DFDs 30

 Step 3: Draw the LowerLevel Diagrams  Must use leveling and balancing techniques  Leveling examples  Uses a series of increasingly detailed DFDs to describe an information system  Exploding, partitioning, or decomposing

DFD Level 1

31

Parent diagram

Child diagram

32

การเขียนโดย ไม่แสดง External entity

33

Creating a Set of DFDs 34

 Step 3: Draw the Lower-Level Diagrams 

Balancing Examples  Ensures that the input and output data flows of the parent DFD are maintained on the child DFD

35

Exercise: find the mistakes 36

Data Dictionary 37



A data dictionary, or data repository, is a central storehouse of information about the system’s data



An analyst uses the data dictionary to collect, document, and organize specific facts about the system



Also defines and describes all data elements and meaningful combinations of data elements

Data Dictionary 38

 A data element, also called a data item or field, is the smallest piece of data that has meaning

 Data elements are combined into records, also called data structures

 A record is a meaningful combination of related data elements that is included in a data flow or retained in a data store

Data Dictionary 39

 Using CASE Tools for Documentation 

The more complex the system, the more difficult it is to maintain full and accurate documentation



Modern CASE tools simplify the task



A CASE repository ensures data consistency

Data Dictionary  Documenting the Data Elements You must document every data element in the data dictionary  The objective is the same: to provide clear, comprehensive information about the data and processes that make up the system 

Data Dictionary 41

 Documenting the Data Elements (cont) 

The following attributes usually are recorded and described  Data element name and label  Alias  Type and length  Default value  Acceptable values - Domain and validity rules

Data Dictionary 42

 Documenting the Data Elements (cont) 

The following attributes usually are recorded and described  Source  Security  Responsible user(s)  Description and comments

example 43

 Info for a data element names SOCIAL SECURITY NUMBER System: payroll  Label: system security number  Alias: SSN  Type and length: 9N  Default value: none  Source: employee application form  Acceptable values: any positive number (domain)  Security: payroll department  User responsibility: payroll department 

44

Data Dictionary 45

 Documenting the Data Flows 

The typical attributes are as follows  Data flow

name or label

 Description  Alternate name(s)  Origin (source

for data flow can be a process, a data

store, or an entity)  Destination (DFD ending point)

46



Record 

Each data flow represents a group of related data elements called a record or data structure



In most DD, records are defined separately from the data flow and data store.



more than one data flow or data store can use the same record



Volume and frequency 

Expected number of occurrences for a data flow per unit of time e.g. 300 time cards per week

47

Data Dictionary 48

 Documenting the Data Stores 

Typical characteristics of a data store are  Data store name

or label as

it appears on DFD  Description  Alternate name(s)  Attributes  Volume and frequency

Data Dictionary 49

 Documenting the Processes 

Typical characteristics of a process  Process name

or label

 Description  Process number  Process description

Data Dictionary 50

 Documenting the Entities 

Typical characteristics of an entity include  Entity name  Description  Alternate name(s)  Input data flows  Output data flows

Data Dictionary 51

 Documenting the Records 

Typical characteristics of a record include  Record or

data structure

name  Definition or

description

 Alternate name(s)  Attributes

Data Dictionary 52



Data Dictionary Reports –

Many valuable reports •

An alphabetized list of all data elements by name



A report describing each data element and indicating the user or department that is responsible for data entry, updating, or deletion



A report of all data flows and data stores that use a particular data element



Detailed reports showing all characteristics of data elements, records, data flows, processes, or any other selected item stored in the data dictionary

Process Description Tools 53



A process description documents the details of a functional primitive, which represents a specific set of processing steps and business logic



It should be noted that this chapter deals with structured analysis, but the process description tools also can be used in object-oriented development, which is described in Chapter 6

Process Description Tools 54

 Modular Design 

Based on combinations of three logical structures, sometimes called control structures, which serve as building blocks for the process  Sequence  Selection  Iteration - looping

55

Process Description Tools 56

 Structured English 

Must conform to the following rules  Use only

the three building blocks of sequence,

selection, and iteration  Use indentation for  Use a

readability

limited vocabulary, including standard terms used

in the data dictionary and specific words that describe the processing rules

57

58

Input data flows: order, credit status, product detail Output data flows: rejected order, accepted order

For each ORDER if CUSTOMER STATUS CODE = ‘Y’ and PRODUCT DETAIL = ‘OK’ then output ACCEPTED ORDER else output REJECTED ORDER

Process Description Tools 59

 Structured English 

Might look familiar to programming students because it resembles pseudocode



The primary purpose of structured English is to describe the underlying business logic

Process Description Tools 60

 Decision Tables 

Shows a logical structure, with all possible combinations of conditions and resulting actions



It is important to consider every possible outcome to ensure that you have overlooked nothing

Process Description Tools 61

 Decision Tables 

The number of rules doubles each time you add a condition



Can have more than two possible outcomes



Often are the best way to describe a complex set of conditions

Table with two conditions 62

An order will be accepted only if the product is in stock and the customer’s credit status is OK

Table with three conditions 63

• An order will be accepted only if the product is in stock and the customer’s credit status is OK • The credit manager can waive the credit status requirement

64

การ Simplify ตาราง

Multiple outcomes 65

• Preferred customers who order $1,000 or more are entitled to a 5% discount, and an additional 5% discount if they use our charge card • Preferred customers who do not order $1,000 or more will receive a $25 coupon • All other customers will receive a $5 bonus coupon

66

Process Description Tools 67

 Decision Trees

Logical Versus Physical Models 68

 While structured analysis tools are used to develop a logical model for a new information system, such tools also can be used to develop physical models of an information system

 A physical model shows how the system’s requirements are implemented

Logical Versus Physical Models 69

 Sequence of Models 

Many systems analysts create a physical model of the current system and then develop a logical model of the current system before tackling a logical model of the new system



Performing that extra step allows them to understand the current system better

Logical Versus Physical Models 70

 Four-Model Approach 

Develop a physical model of the current system, a logical model of the current system, a logical model of the new system, and a physical model of the new system



The only disadvantage of the four-model approach is the added time and cost

Chapter Summary 71



During data and process modeling, a systems analyst develops graphical models to show how the system transforms data into useful information



The end product of data and process modeling is a logical model that will support business operations and meet user needs



Data and process modeling involves three main tools: data flow diagrams, a data dictionary, and process descriptions

Chapter Summary 72

 Data flow diagrams (DFDs) graphically show the movement and transformation of data in the information system

 DFDs use four symbols  A set of DFDs is like a pyramid with the context diagram at the top

Chapter Summary 73



The data dictionary is the central documentation tool for structured analysis



Each functional primitive process is documented using structured English, decision tables, and decision trees



Structured analysis tools can be used to develop a logical model during one systems analysis phase, and a physical model during the systems design phase

Apply your knowledge 74

 Precision Tools sells a line of high-quality woodworking tools. When customers place orders on the company’s website, the system checks to see if the items are in stock, issues a status message to the customer, and generates a shipping order to warehouse, which fills the order. When the order is shipped, the customer is billed. The system also produces various reports.

75

1. 2.

Draw a context diagram for the order system Draw a diagram 0 DFD for the order system