Where an ER diagram models your data, use-case and data-flow diagrams model your system’s behaviour. Together they make up the system-design section of Chapter 3. Here’s what each one is and how to build it.
Use-case diagram
A use-case diagram shows actors (the roles that use the system) and the use cases (the things they can do). For a clinic system the actors are Patient, Doctor and Admin; the patient’s use cases include Register, Book Appointment and View Records, while the admin’s include Manage Doctors and Manage Schedules. Draw each actor as a stick figure connected to the ovals (use cases) they can perform.
How to build it
- List every role that touches the system — those are your actors.
- For each actor, list what they need to do — those are use cases.
- Connect actors to their use cases; shared ones connect to more than one actor.
Data Flow Diagram (DFD)
A DFD shows how data moves through the system. Level 0 (context diagram) shows the whole system as one process with arrows to and from external entities (e.g. Patient → [Clinic System] → Doctor). Level 1 breaks that single process into the main processes (Manage Patients, Manage Appointments, Generate Reports) and shows the data stores (Patients, Appointments) they read and write.
The four DFD symbols
- Process — an action that transforms data (a circle or rounded box).
- Data store — where data rests (an open rectangle).
- External entity — a source/sink outside the system (a square).
- Data flow — an arrow showing data moving.
Tips
- Keep the context diagram to a single process — that’s the point of Level 0.
- Make sure every data store in your DFD maps to a table in your ER diagram.
- Use cases should line up with the functional requirements you listed earlier.
Pair this with our ER diagram examples and the full documentation template.