--:-- --
↓ Scroll for more

Unit 5.3

Database vs. File System: Understanding the Difference

IT 231: IT and Application

Learning Objectives 🎯

By the end of this chapter, you will be able to:

  • ✅ Describe the traditional file system approach to managing data.
  • ✅ Identify the major problems associated with the file system approach.
  • ✅ Explain how a database approach solves these problems.

The "Old Way": The File System Approach

Definition: Storing data in a collection of separate, application-specific files.

Think of it like separate digital filing cabinets for each department. 🗄️

  • The accounting department has its own set of files.
  • The sales department has a completely separate set of files.
  • Each application has its own private data.

Visualizing the File System Approach

The same customer data is duplicated across departments.

Accounting Dept.


customer_billing.csv

Contains: Name, Address, Bill

Sales Dept.


customer_contacts.txt

Contains: Name, Address, Phone

Marketing Dept.


mailing_list.xls

Contains: Name, Address, Email

🔍 This separation created several major problems for organizations.

Problem 1: Data Redundancy

The same piece of information is stored in multiple places unnecessarily.

Example: A customer's address is stored in:

  • The Sales file
  • The Marketing file
  • The Accounting file

Wasted Space & Effort

This wastes storage and requires multiple updates for a single change, leading to the next problem...

Problem 2: Data Inconsistency

A direct result of redundancy. When data is not updated everywhere, it becomes inconsistent and unreliable.

Scenario: Customer Moves

A customer, Sita Rai, moves from Pokhara to Kathmandu.

  • Sales updates their file: Address = Kathmandu
  • Accounting forgets to update: Address = Pokhara

Result: Which address is correct? The data cannot be trusted!

Problem 3: Data Isolation

Data is scattered in different files with different formats, making it difficult to access and integrate.

Sales Data

Format: .xls

Accounting Data

Format: .dat

Marketing Data

Format: .csv

Challenge: How do you write one program to get a complete, 360-degree view of a customer?

The Solution: A New Approach ⚡

Organizations needed a way to manage data that was centralized, consistent, and accessible.

Enter the Database Approach.

The Database Approach

The solution is to store all organizational data in a single, centralized location, managed by a specific software.

Database: A shared collection of logically related data.

Database Management System (DBMS): Software that controls the creation, maintenance, and use of a database (e.g., MySQL, Oracle, SQL Server).

File System vs. Database Approach

Before: File System

Sales File

Acct. File

Mktg. File

...leads to...

Redundancy & Inconsistency

After: Database

Sales App

Acct. App

Mktg. App

...all access...

📊 Central Database (via DBMS)

The database provides a "single source of truth" for the entire organization.

Practical Application: Nepal Context

Scenario: Vehicle Registration ("Yatayat")

Imagine the old file-based system for vehicle ownership (the "blue book").

  • Traffic Police Office: Has a file for fines and violations.
  • Transport Management Office (Yatayat): Has a file for ownership and tax records.
  • Insurance Company: Has a file for the insurance policy.

Problem: If you sell your scooter, the new owner's name might be updated at the Yatayat office but not in the Traffic Police's file. A traffic fine could be sent to you, the old owner! This is data inconsistency.

Solution: A modern, centralized database ensures all three departments see the same, up-to-date owner information from a single source.

Summary & Key Takeaways

  • The File System Approach stores data in separate, isolated files, leading to major problems.
  • The three core problems are Data Redundancy, Data Inconsistency, and Data Isolation.
  • The Database Approach solves this by using a central database and a DBMS to manage all data.
  • This creates a "single source of truth", ensuring data is consistent, secure, and easily shared across the organization.

Thank You!

Any Questions?

Next Up: Unit 5.5 - Database Management Systems (DBMS)