Overview
This lecture covers context diagrams and data flow diagrams, explaining their symbols, purposes, and how to use them to model system interactions and data movement.
Context Diagrams
- Context diagrams provide a high-level view of a system, showing users, system boundaries, and main data flows.
- The main symbols are: a single circle (whole system), rectangles (external entities), and arrows (data flows).
- Each arrow is labeled with the type of data going in or out of the system.
- Context diagrams identify all external entities interacting with the system (e.g., users, staff, banks).
- Only one process (the entire system) appears in a context diagram.
Example: Canteen App Context Diagram
- Place the canteen app name in a central circle.
- Draw rectangles for students, canteen staff, and optionally, the bank.
- Students provide details, orders, and payment information to the system; receive confirmation and receipts.
- Staff receive orders; may input menu updates or specials.
- The bank handles payments; receives payment info and returns confirmation.
Data Flow Diagrams (DFDs)
- Data flow diagrams (DFDs) give a more detailed breakdown of system processes and data storage.
- DFD symbols include multiple circles (processes), rectangles (external entities), arrows (data flows), and open-ended rectangles (data stores).
- Each process in the system is represented as a separate circle, each dealing with a specific function (e.g., make order, process payment).
- Data stores represent where data is saved (files, databases).
- Data must flow through processes (not directly between external entities and data stores).
Example: Canteen App Data Flow Diagram
- Separate circles for "Create Order," "Print Orders," "Process Payment," and "View Menu."
- Data stores for "Orders Database" and "Menu Database."
- Students send details and orders to "Create Order"; information is stored in "Orders Database."
- "Orders Database" sends orders to "Print Orders" for staff.
- Payments are processed via "Process Payment," involving the bank as an external entity.
- "View Menu" process retrieves menu items from the "Menu Database" for students.
Key Terms & Definitions
- Context Diagram — High-level diagram showing system, external entities, and main data flows.
- External Entity — User, organization, or system interacting with the system.
- Data Flow — Labeled arrow describing data moving between processes and entities.
- Process — Circle or bubble representing an operation or transformation in a DFD.
- Data Store — Open-ended rectangle showing where data is stored in a DFD.
- Data Flow Diagram (DFD) — Diagram detailing processes, data flows, data stores, and entities.
Action Items / Next Steps
- Practice drawing a context diagram and a data flow diagram for the canteen app.
- Prepare for the next lesson on structure charts and data dictionaries.