Skip to content

Computer Science · Ch 8 — Database Concepts

Introduction

8.1

Introduction

Why We Need Databases

Data is everywhere, and as we saw in the previous chapter, it is incredibly valuable. But value comes from being able to use data — and that starts with storing and managing it properly. Without a good system, data becomes a burden rather than an asset.

Consider a school. It needs to keep track of students, their attendance, and their guardians. The class teacher marks attendance daily in a register — 'P' for present, 'A' for absent — against each student's roll number. If a class has 50 students and the month has 26 working days, that is 1,300 entries (50 × 26) the teacher must write by hand every single month. As the volume grows, manual record-keeping becomes painfully slow and error-prone.

Limitations of Manual Record-Keeping

The textbook highlights four specific problems with the pen-and-paper approach in this school example:

  1. Repetitive data entry. When students are promoted to the next class, their roll numbers and names must be written all over again in a fresh attendance register.
  2. Inconsistency and errors. Writing student details on each month's attendance page invites mistakes — names spelled differently, students accidentally skipped, records misplaced.
  3. Risk of data loss. If the attendance register is lost or damaged, all that data is gone forever.
  4. Manual calculation errors. Consolidating attendance at the end of the month — adding up presents and absences — is prone to arithmetic mistakes.

Beyond attendance, the office staff also maintain student details (Roll Number, Name, Date of Birth) along with guardian details (Guardian Name, Contact Number, Address) for correspondence about attendance and results. Finding a specific piece of information from a huge pile of papers, or modifying or deleting an entry, is a slow and frustrating task.

The Solution: Computerised Data Files

To overcome these hassles, the school can store attendance records and student details in separate data files on a computerised system. This shift gives teachers and office staff several powerful abilities:

  • Copy data easily. When students are promoted, the details can be simply copied from the old attendance file to the new one — no rewriting needed.
  • Find any data instantly. Searching for a student or guardian record takes seconds, not minutes.
  • Add new data. When a new student joins, their details can be added to the existing file without disrupting anything.
  • Modify existing data. If a student's address or a guardian's phone number changes, the record can be updated cleanly.
  • Delete data. When a student leaves the school, their record can be removed without leaving messy cross-outs or blank pages.

This is the fundamental motivation behind databases: moving from manual, paper-based record-keeping to electronic data management that is fast, accurate, and flexible. The rest of the chapter builds on this idea, introducing the concepts and tools that make such computerised data management possible.