Learning Objectives
By the end of this chapter, you will be able to:
- Define a database and a DBMS and state the difference between data and the software that guards it.
- Show why separate files produce redundancy and inconsistency with a cooperative ledger example.
- Name the five components of a database system and group them into data, engine, and direction.
- Name the three user roles and state what each is allowed to do and not do.
- Weigh the gains and costs of the database approach for a BBA cooperative that must file IRD and answer to NRB.
Three Excel files and one angry member
Siddhartha Saving Cooperative in Rupandehi keeps members in three files. Admissions holds admission.xlsx, Accounts holds fees.xlsx, and the exam section of the staff cooperative holds marks.xlsx for the training ledger. Member 9841 Sita changes her phone number. Only the exam file is updated. On 2081-08-10 she misses an SMS about a Rs 12,000 interest credit because Accounts still holds the old number. At day end the three files show two different phones for the same person, and none of them can prove the closing balance that NRB asks for. The staff blame the computer. The computer was never the system.
A database fixes the structure before blame. One record for one member. Many users read that one record. Rules enforce keys, backups protect it, and access control decides who writes what. For a BBA manager this is the difference between a folder of sheets and a ledger that survives audit.
flowchart LR
U[Users and apps: teller, manager, IRD portal] --> DBMS[DBMS: MySQL or Oracle]
DBMS --> DB[(Central tables: Member, Account, Transaction)]
F1[admission.xlsx] -.->|Same phone stored three times| R[(No single truth)]
F2[fees.xlsx] -.-> R
F3[marks.xlsx] -.-> R
Framework 1: From scattered files to one truth
A database is an organised collection of related data stored so that many users and programs can retrieve it consistently. A Database Management System is the software that creates, stores, updates, and retrieves that data on behalf of users and applications. Examples: Microsoft Access, MySQL, PostgreSQL, Oracle, Microsoft SQL Server. A database is the data. A DBMS is the software. Together with people and procedures they form a database system.
Why separate files fail at branch scale
Folders work for one person. Shared across a cooperative they produce predictable faults.
- Redundancy: the same phone stored in three files. One change means three edits.
- Inconsistency: two different phones for Sita because only one file was edited.
- Weak security: anyone with the file can copy or alter it. No central permission.
- No standard query language: each file answers questions its own way. Cross file reports need manual retyping.
- No integrity rules: nothing stops duplicate member IDs or a transaction without a member.
A DBMS sits between users and the data and enforces structure. It defines tables, enforces keys, controls access, logs changes, and supports backup and recovery. Manual sheets cannot do those four jobs at once.
| File approach | Database approach |
|---|---|
| Same member in many files | One row per member in a Member table, referenced by ID |
| Edit one file, others drift | One edit, all views read the same row |
| Permissions by file copy | Permissions by user and role on tables and rows |
| Answers depend on who filtered the sheet | SQL gives one answer from one source |
| Duplicate ID possible | Primary key blocks duplicate MemberID |
Worked example: one member, three files
| Office | File | Member 9841 phone |
|---|---|---|
| Admissions | admission.xlsx | 9841-000111 |
| Accounts | fees.xlsx | 9841-000111 |
| Exam section | marks.xlsx | 9851-000222 (edited, others not) |
The branch now has redundancy with three copies and inconsistency with two values. In a database, phone is stored once in a Members table keyed by MemberID 9841. Every office reads that one field. One update fixes all views. The closing balance on 2081-08-10 is also one number, not three to reconcile.
Framework 2: The anatomy of a database system and who touches it
Do not memorise five parts in a flat list. Group them so you can budget and assign responsibility.
A. Data: the content
Facts organised into tables, records, and fields. Members, Accounts, Transactions. Keys link them. Data quality at entry decides everything downstream. A wrong member ID at input poisons every report after.
B. Engine: hardware and software
- Hardware: servers, disks, and the network that connects branches to the server. For Siddhartha this is a small server in Butwal plus UPS and a nightly backup disk.
- Software: the DBMS plus the applications built on it: forms, mobile app, IRD export, NRB report generator. The DBMS handles storage and retrieval. The app handles the teller screen and the VAT rule.
C. Direction: users and procedures
- Procedures: written rules for who enters what, who approves, how backup runs, how recovery is tested. A procedure is the cheapest control and the most ignored.
Who uses the system
- End users: clerks, customers, managers who enter and view data through forms and reports. They should not touch tables directly.
- Application developers: write the programs that read and write the tables. They enforce business rules like no withdrawal above balance.
- Database Administrator: designs the structure, grants access, monitors performance, runs backups, tests restore, and owns recovery. In a cooperative this is one trained staff plus a vendor on call. The DBA alone can alter table structure and restore from backup.
Self-check
Framework 3: Gains and costs for a finance operation
Every benefit has a bill. Name both before you propose a database.
What it gains
- Less redundancy and better consistency: one member row, one balance. No month end hunt for which phone is true.
- Sharing across departments: admissions, accounts, and audit read the same tables with different permissions.
- Central security and control: access by role. Tellers post, managers approve, auditors read. Every change is logged.
- Standard language for questions: SQL produces the same IRD sales register and NRB loan report each time without retyping sheets.
- Integrity rules: primary keys block duplicate MemberID. Foreign keys block a transaction without a valid member. Check rules block negative stock or overdraft beyond limit.
What it costs
- Licence, hardware, and skill: servers, DBMS licence where applicable, and a DBA. MySQL and PostgreSQL lower licence cost but still need skill.
- Design complexity: tables and relationships must be planned before data entry, not after.
- Shared risk: one central failure can stop many counters at once if backup and replication are missing.
- Discipline: needs regular backup,tested restore, and controlled access. Sheets feel faster on day one and cost more by quarter end.
| Gains | Costs |
|---|---|
| One truth for member and balance | Server, storage, and backup hardware plus UPS |
| Role based access and audit trail | DBA time and training |
| SQL for repeatable IRD and NRB reports | Upfront design before first entry |
| Integrity rules that block duplicates | Single point of failure if backup is not tested |
| Proven close and quick reporting | Change control so not everyone edits the ledger |
Nepal worked example: one Member table saves a cooperative (NPR, BS 2081-08-10)
Siddhartha moves to one database on 2081-08-10. Design cost Rs 60,000 for a vendor who builds Member, Account, and Transaction tables with MemberID as primary key. Server Rs 85,000, UPS Rs 18,000, backup disk Rs 12,000. Year one build = Rs 175,000. MySQL has no licence fee. Annual DBA support is Rs 60,000 at Rs 5,000 a month. Annual cost from year two = Rs 60,000 plus power and disk replacement about Rs 12,000, total Rs 72,000. Before the database, three staff spent four days a month reconciling sheets at Rs 1,800 a day = Rs 21,600 a month or Rs 259,200 a year. The database pays for itself inside ten months on time saved alone, before counting penalty risk.
Data proof: on 2081-08-10 the Members table holds one row for 9841 Sita: phone 9851-000222, address Sunwal. The Transactions table holds her deposit of Rs 12,000 at 10:20 and a withdrawal of Rs 4,000 at 14:10. A teller mistakenly re enters the old phone 9841-000111 through the form, but a unique key on phone plus an edit approval rule flags the duplicate and routes it to the manager for confirmation instead of overwriting silently. The manager approves 9851-000222 and rejects 9841-000111 in one click. Every report after reads the approved value.
Compliance proof: IRD requires a monthly sales register with 13 percent VAT. The database generates it with one query. For August, taxable sales of services total Rs 180,000. Output VAT = Rs 23,400. The same source generates the NRB member balance report without retyping from three sheets. When a query result and a sheet differ, the query is right because it reads one committed table, not three drifting files.
Summary
- A database is related data stored once with structure. A DBMS is the software that guards it. A database system is data plus hardware, software, users, and procedures under one set of rules.
- Separate files create redundancy and inconsistency and cannot enforce security or integrity at scale. A DBMS centralises the data and controls who reads and writes what.
- A system has five components best grouped as data, engine, and direction, with three roles: end user, developer, and DBA. Procedures are the cheapest control that prevents the most expensive error.
- For a BBA cooperative the database approach costs more up front at about Rs 175,000 in the Siddhartha example, but saves about Rs 259,200 a year in reconciliation time and removes the drift that produces IRD and NRB errors.
Key Takeaways
- One member, one row, keyed by MemberID. That single rule removes most inconsistency.
- Store once, read many ways. Sheets store many times and read one way.
- SQL makes reports repeatable. Repeatable reports survive audit.
- The DBA is not overhead. The role is the control that keeps one truth true after the vendor leaves.
Discussion Questions
- Siddhartha has three files today and 5,000 members. Which fails first under growth: storage, consistency, or security, and why?
- Who should be allowed to delete a member row, and what procedure and log entry should that deletion require?
- When is Excel still acceptable as a small database, and what signal tells you it has stopped being enough for a cooperative that reports to NRB?
Exercises
Short answer
- Define a database and a DBMS with one example each and state the difference with precision.
- What are redundancy and inconsistency? Show both with the Sita phone example from 2081-08-10.
- List the five components of a database system and map each to data, engine, or direction. Name the three user roles.
Long answer
- The database approach overcomes the limits of the file system. Discuss with the Siddhartha example of three files showing two phones for member 9841. Cover redundancy, inconsistency, security, query language, and integrity rules, then quantify year one build at Rs 175,000 versus Rs 259,200 annual reconciliation saving.
- Explain the roles of end users, application developers, and the DBA in a cooperative that must produce IRD VAT and NRB reports from one database. State who designs the Member table, who posts a Rs 12,000 deposit, and who restores the database after a disk failure, with the reason each role cannot do the other’s job.


