DFD Assignment - Stock & Transaction
Management System
This document presents the Data Flow Diagrams (DFD) and Flowchart for a Stock and Transaction
Management System in a small shop or minimarket. The system handles product stock
management, sales transactions, and reporting for the shop owner. The external entities
considered are the Buyer and the Shop Owner.
Context Diagram (Level 0)
At Level 0, the system is represented as a single process: "Stock & Transaction Management
System". The external entities are: - Buyer: interacts with the system by making purchases and
receiving receipts. - Shop Owner: manages product stock and receives reports from the system.
DFD Level 1
At Level 1, the main system is decomposed into three sub-processes: 1. Manage Product Stock -
updates product information into the Product Database. 2. Process Transaction - handles
purchases from the Buyer, updates databases, and issues receipts. 3. Generate Reports - compiles
information from databases to provide reports to the Shop Owner. Data Stores: - Product Database:
contains product and stock information. - Transaction Database: stores transaction records.
DFD Level 2 (Process Transaction)
At Level 2, the "Process Transaction" process is further detailed into the following sub-processes: 1.
Validate Product Availability - checks if requested product is available in stock. 2. Calculate Total
Price - computes the total price of items purchased. 3. Record Transaction - saves transaction
details in the Transaction Database. 4. Update Stock - reduces stock quantities in the Product
Database. 5. Print Receipt - generates a purchase receipt for the Buyer.
Flowchart (Process Transaction)
The flowchart illustrates the logical flow of the 'Process Transaction' procedure: - Buyer selects
product(s). - The system checks stock availability. - If not available, the Buyer is notified (Out of
Stock). - If available, the system calculates the total price. - The transaction is recorded in the
Transaction Database. - Stock is updated in the Product Database. - A receipt is printed for the
Buyer.
Conclusion:
This DFD and flowchart provide a clear breakdown of the Stock & Transaction Management
System. The diagrams show how external entities, processes, and data stores interact to manage
stock and handle transactions efficiently.