File Systems vs DBMS — A Historical Walkthrough
File system বনাম DBMS — ঐতিহাসিক প্রেক্ষাপট
1. Step Back to 1965 — Before Databases Existed
Before the word database existed in any meaningful sense, every business application stored its data in plain files: punched cards, magnetic tapes, then disks full of fixed-width records. A bank had one file for accounts, another for loans, another for branches. A university had one file for students, another for courses, another for marks. Each file was opened, read, and written by exactly one program — and that program was usually written in COBOL or FORTRAN.
This was the file-processing era. It worked, it shipped products, it ran banks. But within a decade it became clear that the approach did not scale. To understand why the entire industry eventually pivoted to databases, we must first feel the pain that flat files caused.
2. How a Flat-File System Actually Looked
Picture Sonali Bank in 1972, before computers became cheap. Imagine they had three flat files on disk:
Each file is just text on disk. The program — say a COBOL program named PRINT-STATEMENT —
had to know exactly how many bytes per field, where to seek, and how to parse. Adding a new column meant
changing every program that read the file.
3. The Five Cardinal Sins of Flat Files
By the early 1970s every large IT department had felt these five problems first-hand. They are the reason the database industry exists.
| # | Problem | What it actually means | বাংলায় |
|---|---|---|---|
| 1 | Data redundancy | "Rahim, Dhaka" appears in accounts.dat, loans.dat, and customers.dat — the same information stored three times. | একই তথ্য একাধিক ফাইলে — একই data বারবার। |
| 2 | Data inconsistency | Rahim moves to Dhanmondi. The accounts file is updated, the loans file is forgotten. Two "truths" now exist. | একটি ফাইলে আপডেট হয়, অন্যটিতে হয় না — দুই জায়গায় দুই উত্তর। |
| 3 | Difficult querying | "How many customers in Dhaka have a loan above 1 lakh?" requires writing a brand-new COBOL program for that one question. | প্রতিটি নতুন প্রশ্নের জন্য নতুন প্রোগ্রাম লিখতে হয়। |
| 4 | No concurrency | Two tellers cannot safely update the same record at once — locks must be hand-coded. | একসাথে দুজন লিখলে data নষ্ট হয়। |
| 5 | No integrity | Nothing prevents a loan with no matching customer, or a negative balance. | অসম্ভব ডেটা ঢোকা আটকানোর কোনো উপায় নেই। |
In 1968 a US bank lost an entire day of transactions because two batch programs wrote to the same file overnight. That single incident is widely cited as one of the events that motivated the design of modern transaction managers. The same family of bugs would silently destroy any flat-file bKash today.
১৯৬৮ সালে একটি US ব্যাংক রাতারাতি একদিনের পুরো লেনদেন হারায়, কারণ দুটি batch program একই ফাইলে লিখছিল। এই ঘটনাই আধুনিক transaction manager তৈরির অন্যতম প্রেরণা। আজকের বাংলাদেশে কোনো bKash যদি flat file ব্যবহার করত, একই ধরনের বাগ চুপচাপ টাকা গায়েব করে দিত।
Let us reproduce sin #1 — redundancy and inconsistency — in plain SQL. Below we model the same flat-file world but inside SQLite, so we can see the duplication clearly:
-- Rahim's address is stored in BOTH files — and they disagree!
SELECT 'accounts' AS file, customer_name, customer_addr
FROM accounts_flat
WHERE customer_name = 'Rahim'
UNION ALL
SELECT 'loans', customer_name, customer_addr
FROM loans_flat
WHERE customer_name = 'Rahim';
4. The Birth of the DBMS — IMS, IDS & CODASYL
The first attempt at a real database was born out of necessity. In 1966, NASA's Apollo program had to track over two million parts going to the Moon. No flat-file system could handle the cross-references. IBM and North American Aviation built IMS (Information Management System), the first commercial DBMS, on a hierarchical (tree-shaped) data model.
Around the same time, Charles Bachman at General Electric built IDS (Integrated Data Store), which formalised the network model — a graph of records connected by pointers. The CODASYL committee turned IDS into a standard. Bachman won the 1973 Turing Award for it.
Both IMS and IDS were a huge step forward — but they had a problem of their own. To query them, the programmer had to navigate the records: "find this customer node, follow its pointer to the first loan, then to the next loan, then to the branch…" The data model was tied to physical pointers. Change the structure, and every program broke.
5. 1970 — Edgar Codd's 12-Page Revolution
In June 1970, an IBM researcher named Edgar F. Codd published a paper titled "A Relational Model of Data for Large Shared Data Banks" in Communications of the ACM. It is roughly twelve pages long and is one of the most consequential papers in the history of computing.
Codd proposed something audacious: forget pointers. Forget physical structure. Represent data as relations — flat tables of rows and columns — and let the user describe what they want, not how to fetch it. The DBMS would figure out the "how."
Data should be organised into tables, and queries should be expressed in a high-level language based on mathematical set theory and logic — independent of how the data is physically stored.
ডেটাকে টেবিলে সাজাও, query কে গাণিতিক set theory ও logic-এর ভিত্তিতে high-level ভাষায় লেখো — ভিতরে কীভাবে রাখা আছে সেটা গোপন থাক।
IBM's own management ignored Codd at first — they had bet the company on IMS. So Codd lobbied through users, lectures, and competitive pressure. In 1973 IBM finally funded a research prototype called System R, which produced the first SQL implementation. A young Larry Ellison read the System R papers and, in 1979, shipped the world's first commercial relational DBMS — Oracle v2 (there was no v1, for marketing reasons). The relational era had begun.
Below is what Codd's vision looks like today — the same bank data, but in a single normalised relational schema. Notice that "Rahim's address" is now stored exactly once.
-- Find every Dhanmondi customer and their total liabilities
SELECT c.name,
c.address,
SUM(l.amount) AS total_loan
FROM customer c
JOIN loan l ON l.cust_id = c.cust_id
WHERE c.address LIKE '%Dhaka%'
GROUP BY c.cust_id;
6. File System vs DBMS — Side by Side
📂 File System (সেকেলে)
- Data scattered, often duplicated.
- Each program hard-codes byte offsets.
- No rules — anything can be written.
- Concurrent access? Hand-build locks.
- Crash mid-write → corrupt records.
- Every new question = a new program.
🗄️ DBMS (আধুনিক)
- Single source of truth via foreign keys.
- Schema is declarative — metadata lives with data.
- Constraints (CHECK, UNIQUE, FK) enforce integrity.
- Transactions handle concurrency & crashes.
- WAL / journal guarantees durability.
- Any new question = one SQL query.
7. Why This History Matters in 2026
You may think: "Why am I learning about IMS and System R when I will use PostgreSQL or MySQL?" Three reasons:
- Almost every "new" idea in 2026 is a re-invention. Document databases (MongoDB) borrow from the hierarchical model. Graph databases (Neo4j) revive the network model. Knowing the history lets you see what is actually new vs what is rebranded.
- Modern banking systems still use IMS. Yes, in 2026, billions of dollars flow through IMS every day at major US banks. Some legacy systems in Bangladesh's older banks still keep COBOL files alive on mainframes.
- Codd's relational vision is the foundation of every SQL query you will ever write. When your
JOINworks "magically," that magic is Codd.
JOIN-এর পেছনে Codd-এর গণিত।
"Future users of large data banks must be protected from having to know how the data is organised in the machine." — E. F. Codd, 1970. This single sentence is the philosophy of every modern database.
"ভবিষ্যতের ব্যবহারকারীদের কখনো জানতে হবে না, ডেটা মেশিনে কীভাবে সাজানো আছে।" — Codd, ১৯৭০।
8. Glossary (শব্দকোষ)
| Term | Meaning | বাংলায় |
|---|---|---|
| Flat file | A plain text or fixed-width file with no internal indexes or constraints. | Index/constraint বিহীন একটি সাধারণ টেক্সট ফাইল। |
| Redundancy | Storing the same fact in more than one place. | একই data একাধিক জায়গায় রাখা। |
| Inconsistency | Two stored copies disagree. | একই তথ্যের দুই কপির মধ্যে অমিল। |
| IMS | IBM's hierarchical DBMS, born from NASA Apollo. | NASA-এর জন্য তৈরি IBM-এর hierarchical DBMS। |
| CODASYL / IDS | The network-model standard from the late 1960s. | ১৯৬০-এর শেষের network-model মান। |
| System R | IBM's first relational research prototype, birthplace of SQL. | IBM-এর প্রথম relational প্রোটোটাইপ; SQL-এর জন্মস্থান। |
| Relation | Codd's word for a table — a set of tuples. | Codd-এর ভাষায় "table"। |
| Declarative query | You say what you want; the DBMS picks how. | আপনি কী চান বলেন, কীভাবে আনতে হবে DBMS ঠিক করে। |
9. Practice Problems
Try each problem yourself, then click Show Answer. Several answers contain runnable SQL.
-
Name three of the five problems with flat-file processing and give a one-line example of each.Flat-file processing-এর পাঁচটি সমস্যার মধ্যে তিনটি বলুন এবং এক লাইনে উদাহরণ দিন।
✨ Show Answer (উত্তর দেখুন)
Sample answer: (1) Redundancy — Rahim's address stored in both
accounts.datandloans.dat. (2) Inconsistency — Rahim moves; onlyaccounts.datis updated. (3) No integrity — a loan is recorded for a non-existent customer.(১) Redundancy — Rahim-এর address দুই ফাইলেই; (২) Inconsistency — এক ফাইলে আপডেট, অন্যটি পুরোনো; (৩) Integrity-এর অভাব — যে customer নেই তার নামে loan ঢুকে যায়।
-
Build the same flat-file customer redundancy problem in SQL and prove the address conflict using a single query.SQL-এ একই redundancy-সমস্যা বানিয়ে একটিমাত্র query দিয়ে প্রমাণ করুন যে address-এ অমিল আছে।
✨ Show Answer (উত্তর দেখুন)
ans2.sqlSELECT a.cust, a.addr AS addr_in_acct, l.addr AS addr_in_loans FROM acct a JOIN loans l ON a.cust = l.cust WHERE a.addr <> l.addr; -
Who created the relational model, and in what year? In one sentence, what was its key insight?Relational model কে এবং কোন সালে তৈরি করেন? এক বাক্যে এর মূল ধারণাটি লিখুন।
✨ Show Answer (উত্তর দেখুন)
Answer: Edgar F. Codd, in 1970. Insight: data should be modelled as flat tables (relations) and queried by a high-level declarative language, hiding all physical storage details from the user.
Edgar F. Codd, ১৯৭০ সালে। মূল ধারণা: ডেটাকে flat টেবিলে রাখো এবং declarative ভাষায় query করো — physical storage-এর বিস্তারিত ব্যবহারকারী থেকে গোপন থাকুক।
-
Using a normalised schema, list every customer and the total of (account balances + loans). Use the runnable block.Normalised schema ব্যবহার করে প্রতিটি customer-এর (account balance + loan)-এর যোগফল বের করুন।
✨ Show Answer (উত্তর দেখুন)
ans4.sqlSELECT c.name, COALESCE((SELECT SUM(balance) FROM account WHERE cid=c.cid),0) + COALESCE((SELECT SUM(amount) FROM loan WHERE cid=c.cid),0) AS total_exposure FROM customer c ORDER BY total_exposure DESC; -
Explain the difference between hierarchical, network, and relational models in three sentences.Hierarchical, network এবং relational model-এর পার্থক্য তিন বাক্যে।
✨ Show Answer (উত্তর দেখুন)
Answer: Hierarchical (IMS) arranges records as a tree — strict parent-to-child links. Network (CODASYL/IDS) generalises this to a graph where any record can point to any other through manually maintained pointers. Relational (Codd) abandons pointers entirely; everything is a flat table joined by matching values, leaving the DBMS to choose the access path.
Hierarchical (IMS): ডেটা একটি গাছের মতো — parent-child শৃঙ্খলা কঠিন। Network (CODASYL): যেকোনো record যেকোনো record-কে pointer-এ ছুঁতে পারে। Relational (Codd): pointer নেই, সব table — JOIN-এ মিল-যাচাই, পথ DBMS-ই বেছে নেয়।
-
Show what happens when a flat-file program tries to insert a duplicate primary-key record into a relational table.যদি একটি flat-file প্রোগ্রাম relational table-এ duplicate primary key insert করতে চায়, কী হবে দেখান।
✨ Show Answer (উত্তর দেখুন)
ans6.sql-- DBMS will reject this — that's the whole point INSERT INTO student VALUES (101, 'Different Person'); SELECT * FROM student;Flat file হলে দ্বিতীয় rolled = 101 চুপচাপ ঢুকে যেত। DBMS-এ
PRIMARY KEYconstraint তা আটকায়।
Summary — Module 02
From punched cards in 1965 to relational databases in 1979, the industry traded redundant, fragile, program-coupled flat files for a model that is declarative, integrity-checked, and concurrent. The hierarchical IMS solved some problems; the CODASYL network model solved a few more; but it took Codd's 1970 paper and IBM's System R prototype to give us the relational model and SQL — the language we will spend the rest of this course mastering.