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.
  • Compare the two approaches and recognize when a simple file system may still be enough.

The File System Approach

Before modern databases, data was often stored in a collection of separate application-specific files. This is known as the file system approach. For example, the accounting department would have its own set of files, and the sales department would have a completely separate set of files.

Today the same approach survives as separate spreadsheets kept by different people or branches, which leads to the same problems.

Problems with the File System Approach

This approach created several major problems for organizations:

  1. Data Redundancy: The same data was often duplicated across many different files. A customer’s address, for example, might exist in the sales file, the marketing file, and the accounting file.

  2. Data Inconsistency: This is a direct result of redundancy. If a customer’s address changed, it might be updated in one file but not the others, leading to conflicting versions of the data.

  3. Data Isolation: Because data was stored in different files in different formats, it was very difficult to access and share data across different applications or departments.

  4. Program–Data Dependence: Each program was written for a specific file format. Changing the file (for example, adding a new field) meant rewriting every program that used it.

  5. Integrity Problems: Rules such as “age must be positive” or “account balance cannot fall below the minimum” had to be coded separately in each program, so they were easily missed.

  6. Poor Security: It was hard to control which user could see which part of a file; files could be copied or edited without trace.

  7. Concurrent Access Problems: If two users updated the same file at the same time, one update could overwrite the other.

  8. Difficult Backup and Recovery: Each department had to back up its own files, and many did not.

Worked example: a college with separate files

Department File Holds student’s phone number?
Admissions admissions.xlsx Yes
Accounts fees.xlsx Yes
Exam section results.xlsx Yes

A student changes her phone number and informs only the accounts office. Admissions and the exam section still have the old number (inconsistency), so her exam-form reminder SMS never reaches her. The same number stored three times is redundancy, and the principal cannot easily produce one report combining fees and results (isolation).

The Database Approach

The database approach was created to solve these problems. It involves storing all of an organization’s data in a single, centralized database. This database is managed by a Database Management System (DBMS), which is a software program that controls how data is stored, accessed, and updated.

flowchart TB
  subgraph FS[File system approach]
    A1[Admissions program] --> F1[(Admissions file)]
    A2[Accounts program] --> F2[(Fees file)]
    A3[Exam program] --> F3[(Results file)]
  end
  subgraph DB[Database approach]
    B1[Admissions] --> DBMS[DBMS]
    B2[Accounts] --> DBMS
    B3[Exams] --> DBMS
    DBMS --> D[(Single shared database)]
  end

Advantages of the Database Approach

  • Reduced Redundancy and Inconsistency: By storing data in only one place, the database approach creates a “single source of truth,” which dramatically reduces data redundancy and inconsistency.
  • Improved Data Sharing: With all data in a central location, it is much easier for different departments to share information.
  • Increased Security: A DBMS provides sophisticated tools for controlling who can access and modify the data.
  • Data Integrity: Rules (constraints) are defined once in the database and enforced for every program.
  • Data Independence: The structure of data can change without rewriting all the programs.
  • Concurrent Access Control: The DBMS manages many users updating data at the same time without conflicts.
  • Backup and Recovery: Built-in tools restore data after failures.

Comparison

Aspect File system Database (DBMS)
Redundancy High Controlled, minimal
Consistency Poor High
Data sharing Difficult Easy
Security Basic (file-level) Fine-grained (user and field level)
Integrity rules Coded in each program Defined once and enforced centrally
Multi-user access Risk of overwrites Managed by the DBMS
Backup and recovery Manual, per file Built in
Cost and complexity Low Higher: software, design, and skilled staff

When is a file system enough?

For a single user with small, simple data — a personal budget or a shop’s short price list — a spreadsheet or file may be perfectly adequate. A database becomes worthwhile once there are multiple users, related data, growing volume, and a need for accuracy and security.

Summary

The traditional file system approach to data management led to significant problems of data redundancy, inconsistency, isolation, program–data dependence, weak integrity and security, and concurrent-access conflicts. The modern database approach solves these problems by creating a single, centralized database managed by a DBMS. This ensures that data is consistent, secure, and easily accessible to all parts of the organization, though it costs more and needs skilled design.

Key Takeaways

  • The file system approach leads to data redundancy, inconsistency, and isolation.
  • It also causes program–data dependence, integrity, security, and concurrency problems.
  • The database approach uses a central database and a DBMS to manage data.
  • The database approach creates a “single source of truth” for the organization.
  • Simple, single-user data may still be fine in files or spreadsheets.

Discussion Questions

  1. What is the most significant problem with the file system approach? Why?
  2. How does a DBMS help to improve data security?
  3. Provide a real-world example of a problem that could be caused by data inconsistency.

Exam-Style Questions

Short answer

  1. Define data redundancy and data inconsistency.
  2. What is data isolation?
  3. What is program–data dependence?

Long answer

  1. Explain the limitations of the file system approach. How does the database approach overcome them?
  2. Compare the file system and database approaches with a suitable example.