2. Learning
Objectives
:
Why are databases needed?
Problems with the traditional file
system
How DBMS solves these problems
File System vs. DBMS with real-
world examples
3. Why Databases?
Understanding the
Problem with File
System
Scenario:
• A company stores employee data in Excel
files
• Works well for a startup but creates issues as
the company grows
4. Problems in File-Based System (Excel, CSV, Text Files)
Problem Issue
Redundancy (Duplicate Data)
Same employee's data is stored in multiple
files (e.g., "Rahul Kumar" in one file, "Rahul
K." in another) – leads to confusion
Data Consistency Issues
Salary updated in one file but not in another
– which one is correct?
Security Risk
Any user can access or delete the Excel file
accidentally
Slow Data Retrieval
Large files take time to open and search
(e.g., 1 lakh employees' data)
No Multi-User Access
Multiple users cannot edit the same file
simultaneously
Backup & Recovery Issues File corruption can result in data loss
6. Solution – Database Management
System (DBMS)
What is a DBMS?
• A software system that helps store, retrieve, modify & secure data
efficiently
Real-Life Example:
• Facebook: Stores 1 billion users' data in a DBMS – if stored in a file
system, profile searches would take minutes
• Bank Transactions: If a file system was used, UPI balance updates
could take 10 hours! 😅
7. File System vs. DBMS
Feature File System DBMS
Storage Individual files (Excel, CSV) Tables inside a database
Data Redundancy High (same data in multiple files) Low (well-organized data)
Security Low (anyone can edit a file) High (user access control)
Speed Slow for large data Fast
Data Integrity
No constraints (invalid data can
be entered)
Constraints ensure valid data
(Primary Key, Foreign Key, etc.)
Multi-User Access Not possible
Multiple users can access the same
database
8. Real-Life Example
BANKS: ACCOUNT BALANCE
UPDATES WOULD TAKE HOURS
WITH A FILE SYSTEM
ZOMATO: SEARCHING AMONG 1
LAKH+ RESTAURANTS WOULD BE
VERY SLOW WITHOUT DBMS