• Practice data flow diagramming as a tool for structured system programming (process modelling)
DATA FLOW DIAGRAMs
Key Definitions
• A process model is a formal way of representing business processes– Illustrates processes/activities and how data
moves among them
• Data flow diagramming is a technique for creating a process model.– The primary output of data flow diagramming
is a data flow diagram (DFD)
DFD Elements
External Entities
• External people, organizations, systems and data stores
• Reside outside the system, but interact with system
• Either receive info from system (“sink”) or provide data to the system (“source”)
• Examples: Customers, managers
ExternalEntities
Data Stores
• Internal to the system• Data at rest• Include in system if the system
processes transform the data– Create, Update, Delete
• Every data store on DFD should correspond to an entity on an ERD
• Must have at least one input data flow (or else they never contain any data)
• Usually have at least one output data flow
• Data can only enter a data store from a process and can only leave a data store to a process
Data StoresD1
Data Flows
• Data in motion– From external entity (“source”)
to system
– From system to external entity (“sink”)
Data Flow
Context Diagram
• Shows the context into which the business process fits
• Shows the overall business process as just one process
• Shows all the external entities and the data flows into and out of the system from them
Context Diagram Example
DFD Fragment Example
DFD level 0 Example
PatientPatient
Find patient
1
Update patient
3
Add new patient
4
Delete patient
2
New patient information
Changes topatient information
Patientname
D1 Patient Information
Patientinformation
Patientinformation to delete
Patientinfo to be updated
Updatedpatientinformation
Patientinformation
Deletedpatient
Key Definition
• Decomposition is the process of modeling the system and its components in increasing levels of detail.– Ideally 3-9 processes per DFD
• Balancing involves insuring that information presented at one level of a DFD is accurately represented in the next level DFD.
Are these in balance?0
GradingSystem
ProfessorStudent
assignment info
student info
grade report
grade info
completed assignment
GradesD1
Maintainstudentsstudent info
Maintainassignments
7
Producegrade report
grade info
Professor
5
Gradeassignment
D2Assignments
D3Students
assignment info
Student
1
grade info
student info
assignment info
grade report
3
studentinfocompleted
assignment
grade info
assignmentinfo
Context
Level 0
Hierarchical Consistency
• Balancing Data Flows– An input (output) data flow on a PARENT
diagram must appear on a CHILD diagram as input (output).
– Conversely, an input (output) data flow on a CHILD diagram must appear on a PARENT diagram as input (output).
– A set of data flows on a child diagram that were split from a data flow on a parent diagram must match the parent data flow's composition.
Problem statement
Al Burns is the professor for the class. He manually creates a spreadsheet with all the student information based on a course roster he gets from Campus Connect. He also creates a list of assignments, a description for each assignment, and a grading key for each one.
Students complete the assignment and give them to Al Burns. Al Burns collects the assignments and gives them to Ms. Grader for grading. Ms. Grader grades the assignments based on a key provided by Al Burns, and assigns a score (grade) from 0 to 5. She then records the scores for the students on the spreadsheet.
Grades are reported back to students via a course web page created from the spreadsheet.
Assignment: Draw a context diagram and level 0 diagram for the Grading System.
Grading System DFD Context
0
GradingSystem
ProfessorStudent
assignment info
student info
grade report
grade info
completed assignment
Grading System DFD Level 0
GradesD1
Maintainstudentsstudent info
Maintainassignments
7
Producegrade report
grade info
Professor
5
Gradeassignment
D2Assignments
D3Students
assignment info
Student
1
grade info
student info
assignment info
grade report
3
studentinfocompleted
assignment
grade info
assignmentinfo