HomeDFD examples › ATM System

DFD for ATM System

Context diagram and Level 1 DFD for a atm system, explained step by step, and ready to edit in the browser.

The ATM system is a classic DFD example in software engineering courses. It's small but shows verification, transactions and communication with an outside bank server clearly.

Below you'll find the context diagram (Level 0) and the Level 1 DFD, with every entity, process, data store and data flow explained. Open either one in the editor to change it for your own project.

Context diagram (Level 0)

Context diagram (Level 0 DFD) for ATM System

Context diagram for the atm system: the whole system as process 0, with its external entities.

External entities

  • Customer: Inserts a card, enters a PIN, chooses a transaction, and receives cash, balance slips and receipts.
  • Bank Server: The bank's core system. It supplies account and PIN data and receives transaction details.

Data flows in the context diagram

FromToData flow
Customer0 ATM SystemCard, PIN & transaction request
0 ATM SystemCustomerCash, balance & receipt
0 ATM SystemBank ServerTransaction details
Bank Server0 ATM SystemAccount data & approval

Level 1 DFD

Level 1 DFD for ATM System

Level 1 DFD: process 0 broken into its main processes, with the data stores they use.

Processes

ProcessWhat it does
1.0 Verify Card & PINChecks the card and PIN against the bank's data and starts a verified session.
2.0 Withdraw CashTakes the amount, sends the transaction to the bank, dispenses cash and prints a receipt.
3.0 Balance EnquiryGets the account balance from the bank and prints a balance slip with a mini statement.

Data stores

  • D1 Transaction Log: A record of every withdrawal and enquiry made at this ATM.

All data flows in the Level 1 DFD

FromToData flow
Customer1.0 Verify Card & PINCard & PIN
Bank Server1.0 Verify Card & PINAccount & PIN data
1.0 Verify Card & PIN2.0 Withdraw CashVerified session
1.0 Verify Card & PIN3.0 Balance EnquiryVerified session
Customer2.0 Withdraw CashWithdrawal amount
2.0 Withdraw CashBank ServerTransaction details
2.0 Withdraw CashCustomerCash & receipt
2.0 Withdraw CashD1 Transaction LogTransaction record
Customer3.0 Balance EnquiryBalance request
Bank Server3.0 Balance EnquiryAccount balance
3.0 Balance EnquiryCustomerBalance slip
3.0 Balance EnquiryD1 Transaction LogEnquiry record
D1 Transaction Log3.0 Balance EnquiryMini statement

Is it balanced?

Yes. Every external entity in the context diagram also appears in the Level 1 DFD, and the data going in and out matches. For example, the flows to and from Customer in the context diagram are split into more specific flows on Level 1. Both diagrams also pass DrawDFD's rule checker, with no black holes, miracles or unused data stores.

Tips for your project

  • Account balances belong to the bank, so they come from the Bank Server entity rather than a data store inside the ATM system.
  • Common extensions: 4.0 Deposit Cash, 5.0 Change PIN and 6.0 Fund Transfer.
Level 2: pick the most complex Level 1 process and draw its steps on a new diagram, numbered like 2.1, 2.2, 2.3. Use a System boundary shape labelled with the parent process. How to draw a Level 2 DFD →

More DFD examples

Ready to draw your DFD?

Open the free editor. No sign-up, and you can start from any example.

Open DrawDFD