Top Banner
Logic Modeling • Logic and timing are not represented on data flow diagrams or entity-relationship diagrams • Processes contain logic - what happens under what conditions • Logic is modeled per process • Types of logic: sequence, conditions, iteration
25

Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Dec 28, 2015

Download

Documents

Sheena Grant
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Logic Modeling

• Logic and timing are not represented on data flow diagrams or entity-relationship diagrams

• Processes contain logic - what happens under what conditions

• Logic is modeled per process

• Types of logic: sequence, conditions, iteration

Page 2: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Structured English

• Uses a subset of English

• Uses indentation similar to programming

• Uses process-type verbs like READ, WRITE, GENERATE, CHECK, PRINT

• Verbs and control words in CAPS

• Refers to the data coming in and out of the process

• No specific syntax rules

Page 3: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

READ Inventory recordsWHILE NOT End-of-file DO

BEGIN IFIF Quantity-in-stock is less than Minimum-order-quantityTHEN GENERATE new orderELSE DO nothing

END IFEND DO

Structured English Examples

READ next prescriptionSELECT CASE

CASE (prescription for formulated drug)DO send to lab station

CASE (prescription for off-the-shelf drug)DO send to shelving station

CASE (prescription for narcotic drug)DO send to secure station

END CASE

Page 4: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Conditions/ RulesCourses of Action 1 2 3 4Employee type S H H HHours worked - <40 40 >40

Pay base salary XCalculate hourly wage X X XCalculate overtime XProduce absence report X

Decision Tables

Page 5: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

1

2

Pay base salary

Calculate hourly wage;Produce absence report

Calculate hourly wage

Calculate hourly wage;Calculate overtime wage

Salaried

Hourly <40

40

>40

Legend1) Type of employee2) Hours worked

Decision Trees

Page 6: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Network Models

• Network Decomposition Diagram– hubs - places where data is stored or processing

is done for users at some other location– workstations - places where a user physically

sits and can access the system remotely

• Hub Connectivity Diagrams– simply says what hubs and external networks

have to exchange data

Page 7: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Network Decomposition Diagram

Set ofWorkstations

System

Hub Hub Hub

Workstation

Workstation

Workstation Workstation Workstation

ExternalNetwork

Page 8: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Hub Connectivity Diagram

Hub

Hub

Hub

50 feet35 miles

ExternalNetwork

3000

mile

s

Page 9: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Simple Example

CustomerOrderingSystem

Server

SystemAdministrator

CreditVerification

Service

OrderTakers

ServerCredit

VerificationService

200 miles

Page 10: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Data Dictionary- Includes:

- descriptions of all pieces of data

- relationships between pieces of data

- Purposes- eliminate ambiguities

- identify links between DFDs and ERD

- clarify how different pieces of data are related

- serves as a standard reference throughout the project

- specify what is contained in data stores and flows

Page 11: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

What needs to be defined

Data flows

Data stores

Data elements

Entities

Relationships

Attributes

are collectionsof

are collectionsof

correspond to

Page 12: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Basic parts of a definition

• Name (that appears on the diagram)

• Type (data flow, data store, entity, etc.)

• Description (text)

• Synonyms (other names used for same thing)

• What it contains

• What it is contained in

• Constraints/data type

Page 13: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Data Flow Definition• Name (that appears on the diagram)• Type = data flow• Description (text)• Synonyms• What it contains - list of data elements; lower-level

data flows• What it is contained in - data flow in higher-level

diagram• Constraints - source and destination

Page 14: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Example Data Flow DefinitionName: Customer Record

Type: data flow

Description: The customer information that needs to be stored in the customer DB

Synonyms: none

What it contains: data elements:

customer IDcustomer namecustomer addresscustomer phone

lower-level data flows: none

What it is contained in: none

Constraints:

Source: Process 5, Create Customer Record

Destination: Data Store D3, Customer Master

Page 15: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Data Store Definition• Name (that appears on the diagram, including ID)• Type = data store• Description (text)• Synonyms• What it contains - list of data elements• What it is contained in - n/a• Constraints - physical form, if known

Page 16: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Example Data Store Definition

Name: Customer Master

Type: data store

Description: Information on all customers who have provided this information when placing an order

Synonyms: none

What it contains: data elements:

customer IDcustomer namecustomer addresscustomer phone

What it is contained in: n/a

Constraints: form is a database table

Page 17: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Data Element Definition• Name (does not appear on the diagram)• Type = data element• Description (text)• Synonyms (other data elements and attributes)• What it contains - n/a• What it is contained in (data stores and data flows)• Constraints (format, length, valid values)

Page 18: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Example Data Element Definition

Name: customer name

Type: data element

Description: The last name of a customer who has at one time placed an order

Synonyms: attribute Customer.name

What it contains: n/a

What it is contained in:

data flow Customer Record; data store Customer Master

Constraints: must be a character string with maximum length 15

Page 19: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Entity Definition• Name (that appears on the diagram)• Type = entity• Description (text)• Synonyms• What it contains (attributes)• What it is contained in - n/a• Constraints (identifier)

Page 20: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Example Entity Definition

Name: Customer

Type: entity

Description: Any individual who has at one time placed an order and purchased goods

Synonyms: none

What it contains: attributes Customer_ID, Name, Address, Phone

What it is contained in: n/a

Constraints: Customer_ID must be unique

Page 21: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Relationship Definition• Name (that appears on the diagram)• Type = relationship• Description (text)• Synonyms• What it contains (attributes, including key attributes

of participating entities)• What it is contained in - n/a• Constraints (cardinality, degree, operational

constraints)

Page 22: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Example Relationship

ACCOUNT

account number

balance

ownertype

Has

CUSTOMERNameAddress

Customer_ID Phone8

ChargeCustomerPurchase

D5 Customer Accounts

PurchaseInformation

ERD DFD

CustomerInformation

AccountInformation

Page 23: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Example Relationship Definition

Name: Has

Type: relationship

Description: Associates individual customers with the credit accounts they have with this business, that they can use to purchase goods

Synonyms: data store D5, Customer Accounts

What it contains: attributes Customer.Customer_ID, Account.account_number, owner_type

What it is contained in: n/a

Constraints: binary; many-to-one; mandatory for accounts, but not customers

Page 24: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Attribute Definition• Name (that appears on the diagram)• Type = attribute• Description (text)• Synonyms (other attributes and data elements )• What it contains - n/a• What it is contained in (entities and relationships)• Constraints (format, length, valid values)

Page 25: Logic Modeling Logic and timing are not represented on data flow diagrams or entity-relationship diagrams Processes contain logic - what happens under.

Example Attribute Definition

Name: Name

Type: attribute

Description: The last name of a customer who has at one time placed an order

Synonyms: data element customer_name

What it contains: none

What it is contained in: entity Customer

Constraints: must be a character string with maximum length 15