DFD Lecture Notes
DFD Lecture Notes
DFD Lecture Notes
Design Methods
(1) Structed
A method that is best suited to database projects:
Data flow diagrams (DFD) and entity relationship diagrams (ERD) are the key diagrams to use in this type of
student project.
Cannot be used to model object-oriented systems
Not good for modelling websites
No integral project management approach
(2) Object Oriented
A method that can be used for most student projects:
UML notation can be used to design database systems.
Good for database design, website design and the design of real-time systems
1
Data flow diagrams (DFD)
To clearly and concisely communicate the flow of data through a system.
Data flow diagram (DFD) is a picture of the movement of data between external entities and
the processes and data stores within a system.
Data store - information that is kept and accessed. May be in paper file folder or a database.
External entity - is the origin or destination of data. Entities are external to the system.
Data flow - the flow of data into or out of a process, datastore or entity
2
Rule 2: Process
Can connect to any other symbol (including another process symbol)
Correct or Incorrect?
3
Rule 3: Data Flow
- Is a path for data to move from one part of the Information System to another
- Arrows depicting movement of data
- Can represent flow between process and data store by two separate arrows
Correct or Incorrect?
4
Correct or Incorrect?
5
Correct or Incorrect
6
Exercise: List the errors in the following DFD.
The general principle in Data Flow Diagramming is that a system can be decomposed into
subsystems, and subsystems can be decomposed into lower level subsystems, and so on.
Each subsystem represents a process or activity in which data is processed. At the lowest
level, processes can no longer be decomposed.
Each 'process' (and from now on, by 'process' we mean subsystem and activity) in a DFD has
the characteristics of a system.
Just as a system must have input and output (if it is not dead), so a process must have input
and output.
Data enters the system from the environment; data flows between processes within the
system; and data is produced as output from the system
8
9
DFD Levels
The 'Context Diagram ' is an overall, simplified, view of the target system, which contains only
one process box, and the primary inputs and outputs.
10
DFD Level-1
References:
https://www.cems.uwe.ac.uk/~kg-doyle/tdrewry/dfds.htm
https://itsourcecode.com/uml/bank-management-system-dfd-levels-0-1-2-data-flow-diagram/
http://www.databaseanswers.org/index.htm
Exercise 1:
The Accommodation Office in the University helps students to find accommodation. Interested
students register their interest with the Accommodation Office. Owners of rental properties
11
provide the Accommodation Office with their contact information and information about the
rental property they have available (e.g. location, number of bedrooms, monthly rent), which are
entered into a database. Students can then search this database via the Internet to find a
property that meets their needs (e.g. a2-bed apartment for €800 per month in Newcastle).
The student then contacts the owner of the rental property by sending an email through the
system to arrange a viewing. The student meets the property owner to view the property. Once
a property is rented the owner of the property calls the Accommodation Office and asks them to
delete the listing.
Your task is as follows.
(a)Create a context diagram by identifying the relevant process, data flows, and external entities
for the proposed system as detailed in the scenario above
(b)Decompose this context diagram to a context level-0 diagram by:
• Identifying the processes that represent the major functions of the system
• Assigning a number to each process, ending in 0, which corresponds to the level number of the
DFD
• Identifying the datastores and including them in the Context Level-0diagram
• Identifying any additional dataflows between the processes and the datastores
(c) Create an ERD based on the datastores detailed in the DFD. From reviewing the above
scenario, and using the crow’s foot notation:
• Identify and draw appropriate entities
- Suggest some pertinent attributes for each entity
- Select an identifier for each entity
- Define the relationships between the entities
- Suggest a minimum and maximum cardinality for each relationship
- State clearly any assumptions that you make.
Note: Please ensure that you validate each DFD when it is created. Also, ensure that the DFD’s
are balanced.
12
Exercise 2:
Pizza Express wants to install a new software system to record orders for take-away pizza.
When regular customers call Pizza Express on the phone, they are asked their phone
number. When the phone number is typed into the software system, the name, address, and
last order date is automatically displayed on the screen. Once the order is taken the total
13
cost (including delivery and any applicable discount) is calculated. A receipt is printed. The
order is then given to the chef to make the pizza. Occasionally, special offers (coupons) are
printed so that the customer can get a discount. Drivers who make deliveries of the pizza
give customers a copy of the receipt and a coupon (if any). Weekly totals are kept for
comparison with last year’s performance.
Your task is as follows.
(a) Create a context diagram by identifying the relevant process, data flows, and external
entities for the proposed system as detailed in the scenario above
(b)Decompose this context diagram to a level-0 diagram by:
- Identifying the processes that represent the major functions of the system
- Assigning a number to each process, ending in .0, which corresponds to the level number of
the DFD
- Identifying the datastores and including them in the Context Level-0diagram
- Identifying any additional dataflows between the processes and the datastores(c)Create an
ERD based on the datastores detailed in the DFD. From reviewing the above scenario, and
using the crow’s foot notation:
- Identify and draw appropriate entities
- Suggest some pertinent attributes for each entity
- Select an identifier for each entity
- Define the relationships between the entities
- Suggest a minimum and maximum cardinality for each relationship
- State clearly any assumptions that you make.
Note: Please ensure that you validate each DFD when it is created. Also, ensure that the
DFD’s are balanced.
14
15
Flowchart
16