CSC326 ยท 2080 ยท 10 marks
What do you mean by balancing DFDs? Draw context diagram and data flow diagrams for online movie rental system that allows its users to watch movies online.
What do you mean by balancing DFDs? Draw context diagram and data flow diagrams for online movie rental system that allows its users to watch movies online.[10]
Quick answer
Balancing DFDs refers to the consistency that must be maintained between a parent DFD and its child DFD (exploded diagram) when decomposing a process into more detail.
Balancing DFDs and DFDs for Online Movie Rental System
Part 1: Balancing DFDs
Key Rules for Balancing:
- Every data flow entering or leaving a process on a higher-level DFD must also appear on the corresponding lower-level (child) DFD for that process.
- The inputs and outputs of a parent process must exactly match the inputs and outputs of the child diagram that decomposes it.
- No new external entities should appear in a child DFD that were not present or implied in the parent.
- Data stores that are used only within a child diagram (internal data stores) do not need to appear in the parent diagram, but any data store shared across processes must be consistent.
In short: what goes in and what comes out of a process must be the same at every level of decomposition.
Part 2: Context Diagram and DFDs for Online Movie Rental System
System Description
The Online Movie Rental System allows users to:
- Register and log in
- Browse and search movies
- Rent/stream movies online
- Make payments
- Receive recommendations
- Administrators manage movie catalog and generate reports
Level 0: Context Diagram
The context diagram shows the entire system as a single process with all external entities and major data flows.
Registration/Login Info
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โผ
โโโโโโโโโดโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Movie Search โ โ
โ USER / โโโโโโโโโโโโโโโบโ โ
โ CUSTOMER โโโโโโโโโโโโโโโโ ONLINE MOVIE โ
โ โ Movie Stream โ RENTAL SYSTEM โ
โ โโโโโโโโโโโโโโโโ (Process 0) โ
โ โ Payment Info โ โ
โ โโโโโโโโโโโโโโโบโ โ
โโโโโโโโโโโโโโโโ โ โ
โ โ
โโโโโโโโโโโโโโโโ โ โ
โ โ Movie Detailsโ โ
โ ADMIN / โโโโโโโโโโโโโโโบโ โ
โ MANAGEMENT โโโโโโโโโโโโโโโโ โ
โ โ Reports โ โ
โโโโโโโโโโโโโโโโ โ โ
โ โ
โโโโโโโโโโโโโโโโ โ โ
โ PAYMENT โโโโโโโโโโโโโโโโ โ
โ GATEWAY โโโโโโโโโโโโโโโบโ โ
โโโโโโโโโโโโโโโโ Payment โโโโโโโโโโโโโโโโโโโโโโโโโ
Confirmation
External Entities:
| Entity | Role |
|---|---|
| User/Customer | Registers, searches, rents, and streams movies |
| Admin/Management | Manages catalog, views reports |
| Payment Gateway | Processes payment transactions |
Level 1: DFD (Decomposition of Process 0)
This diagram breaks the main system into major sub-processes.
USER
โ
โ Registration Info
โผ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Process 1.0 โ โ โ
โ User โโโโโโโโโบโ D1: USER DB โ
โ Registration โ โ โ
โ & Login โโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โ Verified User
โผ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Process 2.0 โ โ โ
โ Browse & โโโโโโโโโบโ D2: MOVIE DB โ
โ Search Movies โโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โ Selected Movie
โผ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Process 3.0 โ โ โ
โ Rental & โโโโโโโโโบโ D3: RENTAL DB โ
โ Streaming โโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โ Rental/Payment Request
โผ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Process 4.0 โ โ โ
โ Payment โโโโโโโโโบโ PAYMENT GATEWAY โ
โ Processing โโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โ Payment Confirmation
โผ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Process 5.0 โ โ โ
โ Report โโโโโโโโโบโ ADMIN / โ
โ Generation โ โ MANAGEMENT โ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โฒ
โ Data from D1, D2, D3
Level 2: DFD for Process 3.0 - Rental and Streaming (Exploded)
This shows balancing: inputs/outputs of Process 3.0 match those in Level 1.
Selected Movie (from Process 2.0)
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโ
โ Process 3.1 โ
โ Check Movie โโโโโโ D2: MOVIE DB
โ Availability โ
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ Available Movie
โผ
โโโโโโโโโโโโโโโโโโโโโโโ
โ Process 3.2 โ
โ Create Rental โโโโโโโโโบ D3: RENTAL DB
โ Record โโโโโโโโโ D3: RENTAL DB
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ Rental Confirmed
โผ
โโโโโโโโโโโโโโโโโโโโโโโ
โ Process 3.3 โ
โ Stream Movie โโโโโโโโโบ USER (Movie Stream)
โ to User โ
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ Rental/Payment Request
โผ
(passed on to Process 4.0: Payment Processing)
Balancing Check
The Level 2 diagram takes exactly one input, Selected Movie from Process 2.0, and produces exactly one output, Rental/Payment Request to Process 4.0, which are the same input and output shown for Process 3.0 in the Level 1 diagram. The internal sub-processes (3.1, 3.2, 3.3) and the internal use of D3: RENTAL DB are visible only inside this exploded diagram, which is consistent with the balancing rule that a child DFD's external inputs and outputs must match its parent process exactly, while its internal detail need not appear at the parent level.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.