Skip to content

Informatics Practices · Ch 6 — Database Concepts

Introduction

6.1

Introduction

Data is valuable only if it can be stored, found, updated and summarised without error. Having seen why data matters, the natural next question is how to keep it — and the answer this chapter builds towards is: electronically, using proper data-management methods. The best way to feel the need for this is to watch what happens when an organisation runs entirely on paper.

A school running on paper

Consider a school that maintains data about its students, their attendance record and their guardian details. The class teacher marks daily attendance in a physical attendance register, writing 'P' for present or 'A' for absent against each student's roll number on every working day. The arithmetic of this routine is sobering: for a class strength of 50 and 26 working days in a month, the teacher must make 50 × 26 = 1,300 entries by hand, every single month. As the volume of data grows, manual data entry becomes tedious — and tedium is where errors breed.

What goes wrong with manual record keeping

The paper-based approach in this example suffers from four concrete limitations:

  • Re-entry on promotion. When students are promoted to the next class, their details (roll number and name) have to be written afresh into a brand-new attendance register.
  • Repetition breeds inconsistency. Student details must be copied onto each month's attendance page. Every copy is a fresh opportunity for an incorrectly written name or a skipped student record, so the registers drift out of agreement with each other.
  • No protection against loss. If the attendance register is lost or damaged, the data disappears with it — there is no second copy to fall back on.
  • Error-prone consolidation. When the attendance record is totalled up manually at the end of a period, calculation mistakes creep into the consolidated figures.

The office faces the same problem

Attendance is only half the picture. The school office staff separately maintain, again by hand, the student details — roll number, name and date of birth — together with the corresponding guardian details: guardian name, contact number and address. These records exist because the school must correspond with guardians about a student's attendance and results. In a pen-and-paper system, locating one piece of information inside a huge volume of paper is slow, and deleting or modifying an existing entry is genuinely difficult.

The way out: computerised data files

The remedy for all of these hassles is to move the records onto a computerised system, storing the attendance record and the student details as separate data files. Once the data lives in files on a computer, the office staff and teachers can:

  1. Simply copy student details from the old attendance file into the new one when students are promoted to the next class — no re-writing.
  2. Find any piece of data about a student or a guardian on demand.
  3. Add more details to the existing data whenever a new student joins the school.
  4. Modify stored data — say, a student's or guardian's details — whenever required.
  5. Remove or delete data whenever a student leaves the school.
Note

Notice that each capability in this list is the direct cure for one of the paper-based limitations: copying replaces re-entry, searching replaces leafing through pages, and controlled add/modify/delete operations replace error-prone manual edits.

This sets the agenda for the rest of the chapter: first the file system approach to storing such data and its shortcomings, then the database management system (DBMS) that overcomes them, followed by the relational data model on which most modern databases are built, and finally the keys that keep data in a relational database identifiable and connected.