Learning Objectives
By the end of this chapter, you will be able to:
- Define a cloud database and how it differs from a branch server.
- Group deployment into VM hosted and DBaaS and state who patches.
- Group cloud stores into relational and NoSQL and match each to a BBA workload.
- Compare cloud and premises on cost, scale, and control for a cooperative that reports to IRD.
- Price a festival scale event in NPR dated BS 2081.
From branch server to internet table
A cloud database runs in a provider data center and is reached over the internet. The rows are the same Member and Transaction rows. Only the compute, disk, backup, and replica move. A member in Sunwal at 20:30 reads the same row as a teller in Butwal through one endpoint.
flowchart TB
APP[Teller, app, IRD export] -->|TLS| EP[Cloud endpoint]
EP --> VM[VM: you install MySQL]
EP --> DBS[DBaaS: RDS or Cloud SQL]
VM --> DB[(Storage, replica)]
DBS --> DB
Same ledger, different contract.
Framework 1: How you occupy the cloud, grouped by operator
A. Virtual machine, you operate
Rent a virtual server, install MySQL yourself, patch, schedule backups, size disk. Flexible, burden stays with you.
B. Database as a Service, provider operates
DBaaS is managed. Choose engine and size, provider patches, replicates, backs up. You keep schema, grants, query. RDS, Cloud SQL, Azure SQL for relational; Atlas and DynamoDB for NoSQL.
| Deployment | You do | Provider does | Fit for 4,800 members |
|---|---|---|---|
| VM hosted | Install, patch, backup script | Rack, power, hypervisor | Control wanted, script ready |
| DBaaS | Schema, grants, indexes, query, size | Patch, backup, replica | Less ops labour, faster recovery |
Framework 2: What you store in the cloud, grouped by shape
A. Relational cloud stores
Tables with keys and SQL, now hosted. Good for Member, Account, Transaction, and IRD register. Default for NRB audit.
B. NoSQL cloud stores
Flexible stores without fixed tables. Good for logs, catalogue, chat, graphs. Use beside ledger, not as ledger.
| Store | Example | BBA question |
|---|---|---|
| Relational managed | RDS for MySQL, Cloud SQL | What is correct balance and VAT for 2081-08 |
| Document | Atlas, Firestore | Which products share attributes this week |
| Key value | DynamoDB | Session token for this device now |
| Column family | Bigtable | Taps per minute on payment day |
Framework 3: Cloud versus premises, grouped by decision
Cost
Premises pays once for box plus power and DBA. Cloud pays monthly for compute and storage. Idle capacity costs zero in cloud, full price on premises. Peak for fifteen days should not buy hardware for twelve months.
Scale and access
Premises scales when someone buys a disk. Cloud scales in minutes. Internet is the access path, so mobile improves if link is stable.
Control and compliance
Premises gives full control of location. Cloud shares control under contract, may store outside Nepal. NRB guidance pushes sensitive ledger toward assurance on location and encryption. Many banks keep primary in GIDC and use cloud for log or campaign.
| Factor | On premises in Butwal | Cloud managed |
|---|---|---|
| Pay | Capex plus DBA and power | Monthly by usage |
| Scale | Order disk, wait | Resize in minutes |
| Backup | Your script | Provider backup window |
| Reach | LAN and VPN | Internet endpoint |
| Control | Disk under lock | Contract and region choice |
| Risk | Flood in one building | Link down, bill creep |
Advantages cover scale, redundancy, reach, and focus. Risks cover link, security, lock, location, and cost.
Nepal worked example: Dashain scale on BS 2081-09-20 (NPR)
Ten times traffic for fifteen days. Daily queries 12,000 to 120,000. Premises standby server Rs 1,05,000 plus SSD Rs 28,000 plus config Rs 12,000 = Rs 1,45,000 idle after Tihar.
Cloud DBaaS: base DB Rs 3,600 a month, storage 200 GB at Rs 22 per GB = Rs 4,400, backup Rs 800, internet Rs 2,500. Base = Rs 11,300. For fifteen day peak add replica Rs 3,600 pro rated half month = Rs 1,800, extra compute Rs 1,100, log storage Rs 600. Peak increment = Rs 3,500. Dashain month = Rs 14,800 versus Rs 1,45,000 for standby tin.
VAT proof same date: taxable Rs 2,40,000, output = 2,40,000 x 0.13 = Rs 31,200, input Rs 18,000, net Rs 13,200. Replica serves reads during peak, primary stays write focused, IRD export reads replica at 03:00 and ties to close.
In Nepal GIDC hosts agency systems, global providers host elastic workloads. Hybrid keeps ledger local and cache in global cloud.
Self-check
Try this: scale and VAT (calculable)
Base month Rs 11,300. Dashain adds replica and compute as above for half month.
- Compute peak increment and Dashain total. Compare to Rs 1,45,000 standby.
- Taxable Rs 2,40,000 plus late Rs 22,000. Compute output on reported, corrected, incremental. Input Rs 18,000, compute net before and after.
- Which deployment fits a cooperative lacking full time DBA but must keep grants? Which shape fits ledger under NRB?
Answer sketch
1. Increment = 1,800 + 1,100 + 600 = 3,500. Total = 14,800. Saving = 1,45,000 - 14,800 = 1,30,200 in quarter. 2. Reported output = 31,200. Corrected = 2,62,000 x 0.13 = 34,060. Incremental = 2,860. Net before = 13,200, after = 16,060. 3. DBaaS, provider patches but cooperative keeps grants. Relational managed for ledger, NoSQL for logs.Summary
- Cloud is same Member and Transaction tables reached over internet, billed by use.
- VM keeps operation with you, DBaaS moves patch and backup to provider.
- Relational fits ledger and VAT, NoSQL fits catalogue and logs.
- Dashain on 2081-09-20 shows Rs 3,500 increment on Rs 11,300 base versus Rs 1,45,000 standby.
Key Takeaways
- Name operator before bill.
- DBaaS lowers pump work, not governance of grants.
- For peaks add replica, for law choose region.
Exercises
Short answer
- Distinguish VM hosted and DBaaS on who patches.
- Compare cloud and premises on cost and scale.
- Which store answers five year NRB comparison versus live search?
Long answer
- Compare Rs 1,45,000 standby with cloud base Rs 11,300 plus Rs 3,500 increment. Compute Dashain total and saving, argue hybrid.
- Explain VM versus DBaaS and relational versus NoSQL with VAT Rs 31,200 on Rs 2,40,000.


