Learning Objectives
By the end of this chapter, you will be able to:
- Define TPS and its role as foundation for MIS and analytics.
- Group TPS characteristics and controls that guarantee reliability at volume.
- Distinguish batch and OLTP by timing, use case, and risk.
- Illustrate TPS with a Nepal example priced in NPR and dated in BS 2081.
The Foundation That Cannot Pause
Every firm lives or dies at the counter. A TPS captures each routine transaction as it happens and posts it cleanly to the record. Sale, payment, receipt, order, booking, stock movement, attendance. High volume, low complexity, zero patience for error. When TPS stops, the firm stops. Reports wait. Stock lies. Customers queue.
TPS is operational. It serves the clerk, the machine, the scanner, the payment terminal. Its output feeds everything above: management reports, dashboards, forecasts, audit. If TPS records poorly, every system above reasons on bad numbers.
flowchart LR
subgraph TRANSACTIONS["Business Events"]
T1["Sale"]
T2["Payment"]
T3["Receipt"]
T4["Booking"]
end
TRANSACTIONS --> TPS["TPS\nValidate\nProcess\nStore"]
TPS --> DB[("Database")]
DB --> MIS["MIS\nSummary"]
DB --> ANALYTICS["Analytics\nForecast"]
style TPS fill:#1565c0,color:#fff
Figure 2: TPS As Source For Higher Systems
Grouped Characteristics And Controls
Treat TPS design as three clusters. Each cluster answers a different question: can the system keep up, will the data hold, and can audit trust it.
| Group | Characteristic or control | What it guarantees | How it shows in practice |
|---|---|---|---|
| A. Performance | High volume and high speed | Thousands of small transactions per minute without queue | Supermarket scans 40 items per minute per lane at peak Dashain |
| Availability and recovery | Failover, backup, log, restart | Billing resumes in minutes, no sale lost from log replay | |
| B. Correctness | ACID properties | Transaction is atomic, consistent, isolated, durable | Debit stock and credit sale commit together or not at all |
| Validation and edit checks | Range, format, existence, reasonableness | Barcode must exist, quantity must be positive, discount capped | |
| Structured and auditable steps | Same sequence every time with trace | Capture, validate, compute, post, output, with user and time stamp | |
| C. Timing mode | OLTP real time | Immediate response at point of action | ATM, POS, wallet QR, reservation |
| Batch deferred | Accumulated then processed on schedule | Payroll, interest posting, nightly depot summary, statement generation |
Atomic means the sale either completes fully or leaves no partial posting. Consistent means rules hold after each commit. Isolated means two tills do not corrupt each other. Durable means a committed sale survives a power cut.
The Transaction Cycle In Five Steps
A clean transaction follows the same path every time.
- Capture at source. Barcode, QR, card, or key entry grabs item, quantity, price, buyer PAN if VAT bill.
- Validate before posting. Check master record, price, stock existence, credit limit, tax code.
- Process the business logic. Compute total, VAT at 13 percent, discount, payment settlement, stock reservation.
- Store to the database. Post to sales, stock, receivable or cash, and tax register in one atomic commit.
- Output and report. Print VAT invoice, update display stock, prepare CBMS payload, write log.
Controls sit at steps 2 and 4. Duplicate bill check, credit block, and stock negative block prevent bad commits. Log and backup prevent bad recovery.
Two Modes, Two Clocks
flowchart TB
subgraph BATCH["Batch"]
BT1["Collect"] --> BT2["Hold"] --> BT3["Process together"]
end
subgraph OLTP["OLTP"]
OT1["Event occurs"] --> OT2["Process now"] --> OT3["Result now"]
end
style BATCH fill:#6a1b9a,color:#fff
style OLTP fill:#2e7d32,color:#fff
Figure 3: Batch Versus OLTP
| Mode | Timing | When to use | Nepal example | Risk if misapplied |
|---|---|---|---|---|
| OLTP | Immediate | Stock, payment, booking need instant truth | Kirana POS reduces stock by one at scan, QR wallet debits buyer and credits merchant now | Double sell or oversell if batched |
| Batch | Scheduled | Large volume, end of day reconciliation, non urgent compute | Nightly sales summary from 6 branches to head office, monthly salary run | Late error discovery if forced to real time without check |
Many firms run both. POS is OLTP. End of day transmission to head office is batch. Payroll is batch with a parallel test before live posting.
Worked Example: A Supermarket Chain At Festival Peak, BS 2081
Lumbini Mart runs 7 stores in Rupandehi and Kapilvastu. All counters use IRD enlisted billing that can post to CBMS. Each store runs OLTP POS. Head office runs nightly batch.
Kartik 18, 2081, Tihar eve. 2,140 bills across 7 stores. Average bill Rs. 2,850. VAT 13 percent. One packet noodles Rs. 45 inclusive.
TPS cycle for one bill at Bhairahawa store, counter 2, 17:42:
- Scan item barcode, capture quantity 2.
- Validate item exists, price Rs. 45, stock at least 2, discount code valid.
- Compute line total Rs. 90, bill total with VAT and discount, take QR payment via wallet, generate IRD invoice sequence.
- Post atomically: sales plus, stock minus 2, cash plus, VAT register plus.
- Print VAT invoice, send CBMS record, update stock display for the floor.
Batch layer, same night 23:00. Each store pushes bill summary to head office data mart. Head office reconciles cash, card, and wallet settlements. Exception report lists 3 bills with settlement mismatch for review on Kartik 19.
Daily revenue, one store: 310 bills × 2,850 = Rs. 883,500. Daily revenue, 7 stores: 2,140 × 2,850 = Rs. 6,099,000. VAT collected for day at 13 percent on taxable base is tracked centrally for the VAT return. Delay in batch would push tax visibility and reordering by a full day.
Self-check
Try This Lumbini Mart on Kartik 18, 2081 processes 2,140 bills at average Rs. 2,850, of which Rs. 2,500 is taxable base and Rs. 350 is VAT at 14 percent on base? Correct to 13 percent. Staff error posts VAT as 14 percent for 120 bills. Compute total VAT overcharged on those 120 bills and the refund per bill at correction. Also compute TPS throughput if 2,140 bills occur over 14 trading hours.
Answers: Correct VAT per bill on base 2,500 = 0.13 × 2,500 = Rs. 325. Posted at 14 percent = 0.14 × 2,500 = Rs. 350. Overcharge per bill = Rs. 25. For 120 bills = 25 × 120 = Rs. 3,000 total refund correction. Throughput = 2,140 ÷ 14 = 152.9 bills per hour, about 2.5 per minute per chain, higher per lane. Validation rule that caps VAT rate to 13 percent would have blocked the error at step 2.
Limits And Design Choices
TPS does not decide strategy. It records so others can decide. Batch saves cost but delays truth. OLTP buys immediacy at higher load on locking and network. ACID costs in throughput. Weak validation saves seconds and loses trust. The Best TPS is boring: same path, full log, fast recovery, no surprise.
Summary
TPS is the operational base that supplies accurate, timely records to every report and model above it. Grouped into performance, correctness, and timing, its design trades speed against trust. OLTP suits payment and stock. Batch suits summary and payroll. The festival day at Lumbini Mart shows how OLTP at the counter and batch at night combine in one chain in BS 2081, with VAT, CBMS, and reconciliation tied to the same five step cycle.
Key Takeaways
- TPS captures routine transactions at volume with reliability and audit trace.
- Performance, correctness, and timing clusters drive design choices.
- ACID and validation protect trust before commit and in recovery.
- OLTP is immediate, batch is scheduled, many firms run both.
- TPS feeds MIS and analytics. Bad capture corrupts everything above.
Discussion Questions
- Would you process utility bill payments as OLTP or batch. What error follows the wrong choice.
- A store sees two tills post stock for the same SKU within one second. Which ACID property prevents double subtract and how.
Exercises
Short answer
- Define TPS and state its position relative to MIS.
- List three characteristics from performance and correctness groups.
- Distinguish batch and OLTP with one Nepal example each.
- Name the five steps of the transaction cycle.
Long answer
- Group TPS characteristics into performance, correctness, and timing. For each group explain with a Nepal retail or bank example in BS 2081, including one VAT or CBMS control and its audit effect.
- A supermarket chain posts 2,140 bills at Rs. 2,850 on Kartik 18, 2081. Show how TPS validates, posts atomically, outputs invoice and CBMS record, and supports nightly batch reconciliation. Calculate daily VAT impact if rate is misconfigured and state the control that prevents it.


