UNIT 2 • MODULE 2 • LESSON 04
In Lesson 03 the analyst gathered facts about the Chaguanas Community Library and wrote requirements in words. Words are useful, but long paragraphs make it hard to see how data moves around a system: who supplies it, what happens to it, and where it is kept. Analysts therefore draw models. This lesson covers the most important analysis model in the syllabus, the data flow diagram (DFD), together with the data dictionary that defines every data item in it, and the CASE tools that help analysts produce both.
What you will learn
- The four DFD symbols: external entity, process, data store and data flow.
- The rules that make a DFD valid.
- Context diagrams (level 0) and level 1 DFDs, and how they must balance.
- How to build a level 1 DFD from a written scenario, step by step.
- What a data dictionary is and how to write entries for it.
- What CASE tools are, what they can produce, and what they cannot do for you.
Part 1: What a DFD shows
A data flow diagram shows how data moves through a system and how it is transformed by processes. It does not show the order in which things happen, loops or decisions: that is the job of flowcharts and pseudocode. A DFD answers: where does data come from, what is done to it, where is it stored, and where does it go?
| Symbol | Meaning | Naming rule | Library example |
| External entity | A person, organisation or other system outside the system boundary that sends or receives data. | A noun | Member, Head librarian |
| Process | An activity that transforms incoming data into outgoing data. | A number plus a verb phrase | 1 Record loan |
| Data store | Data held for later use: a file, a database table, even a card index. | An ID (D1, D2) plus a plural noun | D3 Loans |
| Data flow | Data moving between the other symbols, in the direction of the arrow. | A noun phrase naming the data | loan details |
Different textbooks use slightly different shapes. In the Yourdon style, processes are circles; in the Gane and Sarson style used here, processes are rounded rectangles. Either is acceptable in an exam if you use it consistently and label everything.
Part 2: The rules of a valid DFD
A DFD that breaks these rules is marked as incorrect even if the drawing is neat. Learn them as a checklist:
- Every data flow must start or end at a process. Data cannot flow directly from an external entity to a data store, from one data store to another, or between two external entities.
- Every process must have at least one input flow and at least one output flow. A process with only inputs is a “black hole”; one with only outputs is a “miracle”.
- Every data store must have at least one flow in (something writes to it) and at least one flow out (something reads it), somewhere in the full set of diagrams.
- Every flow is labelled with the data it carries. Flows into and out of data stores may be left unlabelled only if the whole record is moved, but labelling is safer.
- Processes are named with verbs (“Record loan”), not nouns (“Loans”).
- A process transforms data: the data going out must be different from, or derived from, the data coming in.
Try it 1Valid or invalid?
Each statement describes part of a DFD. Decide whether it is allowed.
Part 3: Levels of DFD
Level 0: the context diagram
The context diagram (level 0) shows the whole system as a single process, numbered 0, surrounded by its external entities. It has no data stores. Its purpose is to fix the system boundary: what is inside the system and who it exchanges data with.
Level 1: opening up the system
A level 1 DFD breaks process 0 into its main sub-processes (usually three to seven), numbered 1, 2, 3 and so on, and shows the data stores they use.
Read the level 1 diagram as a story. A member asks to borrow a book. Process 1 checks the book’s status in D2 Books, records the loan in D3 Loans and gives the member a receipt. When the book comes back, process 2 records the return date in D3 Loans. Each week, process 3 reads the loan records and members’ contact details and produces an overdue list for the head librarian.
Balancing
The levels must balance: every flow into or out of an external entity on the context diagram must appear on the level 1 diagram, and no new external flows may appear. Check the pair above: request, receipt and return connect Member to the system on both diagrams, and overdue list goes to Head librarian on both. They balance. A level 1 process can be broken down again into a level 2 diagram (processes 1.1, 1.2 and so on) if it is still complex.
Part 4: Building a level 1 DFD from a scenario
Exam questions often give a paragraph and ask for a level 1 DFD. Use this method every time.
Scenario. A school sports club rents out equipment. A student fills in a rental form. The club secretary checks the student’s details in the student file and the item in the equipment file, then records the rental in the rentals file and gives the student a rental slip. When equipment is returned, the secretary updates the rentals file. At the end of each month, the secretary prepares a usage report from the rentals file for the sports teacher.
| Step | What to do | Result for the scenario |
| 1. External entities | Underline people or organisations outside the system that give or receive data. | Student, Sports teacher (the secretary operates the system, so is not an entity here) |
| 2. Data stores | Underline files, records or lists that are kept. | D1 Students, D2 Equipment, D3 Rentals |
| 3. Processes | Underline actions that change data. Name each with a verb. | 1 Record rental, 2 Record return, 3 Produce usage report |
| 4. Data flows | For each process, list its inputs and outputs and label them. | rental form, student details, item details, rental record, rental slip, returned item, return update, rental records, usage report |
| 5. Check the rules | Every flow touches a process; every process has input and output; every store is written and read. | D1 and D2 are only read here; that is acceptable if other processes (not in this scenario) maintain them, but mention it. |
| 6. Balance | Draw or imagine the context diagram and check the external flows match. | Student: rental form, returned item in; rental slip out. Sports teacher: usage report out. |
Notice that the club secretary is not drawn as an external entity. When a person simply operates the system on behalf of someone else, the data really comes from the student. This is a common source of lost marks.
Try it 2Name the DFD element
Each item comes from the sports club scenario above. Choose what it should be on the level 1 DFD.
Part 5: The data dictionary
Labels on a DFD such as “loan details” are short. Programmers need to know exactly what each one contains. A data dictionary is a central list that defines every data item, data flow and data store in the system: its name, meaning, type, size, format and validation rules. It is “data about data” (metadata).
Entries for data elements
| Name | Description | Type | Size or format | Validation |
| MemberID | Unique member number | Text | 6 chars, e.g. M01234 | Starts with M; 5 digits |
| BookID | Barcode on the book | Text | 8 digits | Exactly 8 digits |
| LoanDate | Date the book was borrowed | Date | DD/MM/YYYY | Not in the future |
| DueDate | Date the book must be back | Date | DD/MM/YYYY | LoanDate plus 14 days |
| ReturnDate | Date the book came back | Date | DD/MM/YYYY | Blank or not before LoanDate |
Entries for flows and stores
Composite items are often written with a simple notation: = means “is made up of”, + means “and”, and square or round brackets mark optional parts.
loan details = MemberID
+ BookID + LoanDate
+ DueDate
D3 Loans = {loan details
+ (ReturnDate)}
{ } repeats, ( ) optional
The data dictionary links analysis to design and coding. In Lesson 06 the same items become attributes of entities, and in Lesson 07 they become fields of a C struct. If everyone works from the same dictionary, a BookID cannot be 8 digits in one module and 10 in another.
Part 6: CASE tools
CASE stands for Computer-Aided Software Engineering. CASE tools are programs that support software engineering activities. They range from simple diagram editors to large integrated environments that cover the whole life cycle.
| CASE tools can help to | Examples of outputs |
| Draw and edit diagrams with the correct symbols | DFDs, ER diagrams, structure charts, UML diagrams |
| Check diagrams for rule errors and balancing | A report listing a process with no output, or unbalanced levels |
| Keep a central data dictionary (repository) | Data dictionary listings and reports |
| Generate code or database definitions from a design | Code skeletons, table definitions |
| Produce documentation | Formatted specification documents and reports |
| Support testing and project management | Test reports, schedules, version histories |
Upper CASE tools support early phases (analysis and design); lower CASE tools support later phases (coding, testing, maintenance). An integrated CASE environment covers both.
CASE tools save time, enforce standards and keep diagrams and documents consistent. But they do not replace thinking. A CASE tool cannot interview users, decide what the requirements are, judge whether a project is feasible, or choose the best design. It can only check and present what the analyst enters. Tools can also be costly and take time to learn.
Try it 3Could a CASE tool produce it?
Decide whether each item is a typical CASE tool output or something only people can do.
Try it 4DFD and data dictionary drill
“Symbols” checks DFD notation and rules. “Dictionary” checks data dictionary and CASE ideas.
Common mistakes
- Drawing a flow from an external entity straight into a data store.
- Naming processes with nouns ("Loans") instead of verbs ("Record loan").
- Including the system operator (a clerk or secretary) as an external entity when the real source of data is someone else.
- Putting data stores on a context diagram. Level 0 has none.
- Forgetting to balance: adding a new flow to an entity on level 1 that is not on level 0.
- Writing control logic (if, loop) into a DFD. DFDs show data movement only.
- Thinking a CASE tool can gather requirements or make decisions.
Summary
| Idea | Key point |
| DFD | Shows how data moves and is transformed; four symbols. |
| Rules | Every flow touches a process; every process has input and output; verb names; labelled flows. |
| Context diagram | Level 0: one process, entities, no stores; sets the boundary. |
| Level 1 | Main processes, numbered, with data stores; must balance with level 0. |
| Data dictionary | Defines every data item, flow and store: type, size, format, validation. |
| CASE tools | Software that supports engineering tasks; upper and lower CASE; helps but does not decide. |
Review questions
1. Name and describe the four symbols used in a DFD.
Show answer
External entity: a source or destination of data outside the system. Process: an activity that transforms data, numbered and named with a verb. Data store: data held for later use, labelled with an ID such as D1. Data flow: a labelled arrow showing data moving between symbols.
2. Which analysis model shows data being transformed as it passes through a system?
Show answer
The data flow diagram.
3. State THREE rules for drawing a correct DFD.
Show answer
Any three: every flow must start or end at a process; every process needs at least one input and one output; no flow from store to store or entity to store; label every flow; name processes with verbs; every store must be written and read.
4. Distinguish between a context diagram and a level 1 DFD.
Show answer
A context diagram shows the whole system as one process (0) with external entities and no data stores. A level 1 DFD breaks that process into numbered sub-processes and shows data stores and internal flows.
5. What is meant by balancing DFDs?
Show answer
The external data flows on a lower-level diagram must match those on the higher-level diagram: no flows to or from external entities may be added or lost.
6. What is a data dictionary, and why is it useful?
Show answer
A central record that defines every data item, flow and store, with type, size, format and validation. It keeps definitions consistent between analysts, designers and programmers and supports maintenance.
7. Write a data dictionary entry for a field holding a student’s form class, such as 5B.
Show answer
Name: FormClass; description: student’s form class; type: text; size: 2 characters; format: digit then letter; validation: first character 1 to 6, second character A to F.
8. Give TWO outputs a CASE tool might produce and ONE thing it cannot do.
Show answer
Outputs: DFDs or ER diagrams; data dictionary reports; rule-check reports; generated code. It cannot interview users or decide what the requirements should be.
Homework
- Draw the context diagram and level 1 DFD for the sports club scenario in Part 4.
- Add a new process to the library level 1 DFD: "4 Register member", which receives an application from Member and writes to D1 Members. Redraw the context diagram so it still balances.
- Write five data dictionary entries for the sports club system.
- Process 2 Record return should also update the book’s status in D2 Books. Add the flow and label it.
Mastery quiz: DFDs, data dictionaries and CASE
This 10-question quiz is separate from the short Quick quiz at the end of the lesson. Score 8/10 or higher to earn this lesson’s badge. Your best score is saved in this browser on this device.
Mastery quiz: Data Flow Diagrams, Data Dictionaries and CASE Tools
Your course badges: loading saved progress…
View badges
No course badges earned yet. Score 8/10 in a lesson quiz to earn its badge.
Saved in this browser on this device. Clearing browser data may remove your badges.
Answer all 10 questions. Earn this lesson’s badge at 8/10 or higher. Read the explanations, revisit the Try it activities and retry as often as you need. These are self-study badges, not formal grades.
Exam tips
Specimen Unit 2 Paper 01 (2021), Items 26, 27 and 29. Item 26 gives a DFD and asks what one symbol represents; Item 27 asks which model shows data being transformed; Item 29 asks which item could come from a CASE tool. Know the four symbols by sight, remember that the DFD is the transformation model, and remember that CASE tools produce diagrams, dictionaries and reports, not decisions.
Specimen Unit 2 Paper 02 (2021), Question 3(b). This part asks for a level 1 DFD from a written scenario. Use the six-step method from Part 4: entities, stores, processes, flows, rules, balance. Marks are typically spread across correct symbols, correct processes, labelled flows and correct stores, so a tidy diagram with every flow labelled is worth more than an elaborate one with gaps. Practise on your own scenarios, not on the specimen’s.
Previous: Unit 2 • Module 2 • Lesson 03 – Feasibility Studies and Requirements Analysis. Next: Unit 2 • Module 2 • Lesson 05 – Software Design: Architecture, Structure Charts and Design Strategies.
Syllabus link: CAPE Computer Science (CXC A19/U2/21), Software Engineering (Unit 2, Module 2). Specific Objective 4 (second part): tools and techniques of the analysis phase, including data flow models (DFDs) with symbols for data stores, processes, data flows and external entities; data dictionaries; and CASE tools.
Video search terms
Search YouTube for: "data flow diagram level 0 level 1 tutorial", "DFD rules black hole miracle", "data dictionary systems analysis", "CASE tools upper lower".
Try it 5Quick quiz
Tap an answer. All eight questions are self-checks on this lesson.
Updates
2026/12/01
- First version of the lesson.
© 2026 islandclass.org
