What is a Data Flow Diagram? Why are they used? How to draw them.
“A data flow diagram is used for the visualization of data processing. It illustrates the processes, data stores, external entities, data flows in a business or other system and the relationships between these things.” - Wikipedia
In order to design a new system you need to be able to work out how data flows through a system. During the analysis stage of the system life cycle the analyst would have worked this out by using Data Flow Diagrams (DFDs). The DFD will show: – External entities – Processes – Data stores – Flow of data and information
Receive details into the system. 1.0Receive Customer details DVD details
Customer Receive details into the system. 1.0Receive Check membership. < 3 DVDs rented? Banned? 2.0Valid Customer details DVD details Detail D1 Membership
Customer Receive details into the system. 1.0Receive Check membership. < 3 DVDs rented? Banned? 2.0Valid Add loan details to rental database. 3.0Update Customer details DVD details Detail D1 Membership D2 Rentals
Customer Receive details into the system. 1.0Receive Check membership. < 3 DVDs rented? Banned? 2.0Valid Add loan details to rental database. 3.0Update Update status of borrowed DVD. 4.0Update DVD Customer details DVD details Customer Detail D1 Membership D3 DVD D2 Rentals
Look closely at the previous DFD. Notice how where there is a data store you could relate this to a table in a database. Notice how where there is a process you need to have a query. Notice how where there is data flow you need to have an input into a system. Notice how where there is data flow out of a system there is need for a report. A DFD can help design a database if done correctly.
If you look closely, you can notice that some sections can be broken down further. Section 2 can be broken down to show the processes of checking if the person is a member, and doesn’t already have 3 DVDs on loan and isn’t blocked on the system. This would be known as a Level 2 DFD.
Draw and label the four symbols you’d expect to find in a DFD diagram. Why is it sometimes more suitable to draw a diagram than explain a system in words? Explain how a DFD could help a database designer.
Create a Level 0 and Level 1 DFD which looks at what happens when you buy a pair of trainers from a shoe shop. The scenario... – You have gone into a shoe shop and found a pair of really wicked trainers that you like. You have asked the shop assistant if they have your size. The shop assistant checks on her PDA to see if your size is available. Success! They have your size and you purchase the trainers. The system automatically updates the stock database. You walk away safe in the knowledge that your new trainers will allow you to run and jump faster than everyone else now!