What is a Database?
Your school knows your roll number, your name, your class, your marks and your date of birth. So does the school next door, for its own students. None of that is written on a wall — it is kept somewhere it can be found again, added to, and corrected. That somewhere is a database, and this chapter is about what one actually is.
1The definition
A database is an organised collection of inter-related data.
Two words in that sentence are doing all the work, and an exam will expect both.
The data has a shape you agreed on in advance. Every student record has a roll number, a name and a class — in that order, every time. Not notes scribbled wherever there was room.
The pieces belong together. A roll number, a name and a percentage sitting in one record are about the same student. Random facts stored side by side are not a database.
2Databases you already use
You have been using databases all day without being told. Every one of these is a program looking things up in one:
A name, a number and a photo, kept together, searchable by any of them.
Every account, every transaction, every balance — and it must never lose one.
Admission numbers, marks, attendance, fee receipts, all linked to one student.
Trains, seats, and who has booked which one — for millions of people at once.
Products, prices, stock and orders. When stock hits zero the page says so.
Over a billion records, each one found by a single twelve-digit number.
3The software: DBMS
A database is the data. It still needs a program to look after it — something that can create it, add to it, search it, change it and keep it safe on disk. That program is a Database Management System.
A DBMS is software that helps us create, manage and store a database in digital form on a computer.
| Database | DBMS | |
|---|---|---|
| What it is | The data itself | A program |
| Example | Your school's student records | MySQL, Oracle, MS Access |
| Who made it | Your school, by entering data | A software company |
| Can it exist alone? | It has to be stored and managed by something | Yes — freshly installed, it manages no data at all |
4Why not just a register or a spreadsheet?
A school could keep every record in a paper register. Plenty did. Here is what a DBMS gives you that the register cannot — and each of these is a mark in an exam answer.
A student's address is stored once, not copied into the fee register, the library register and the transport register.
Because it is stored once, correcting it once corrects it everywhere. Three copies means two of them are soon wrong.
"Every student in class 12 who scored above 78" is one instruction, answered in a moment, over any number of records.
The office, the library and the exam cell can all use it at the same time without overwriting each other.
The librarian can be allowed to see names and not marks. A register on a desk shows everything to whoever opens it.
A copy can be restored after a crash. A register that is lost or burnt is simply gone.
83.75, Ravi, Gangtok. Information is what you get after processing it: “the class average is 79.2”, “Ravi is the third-highest scorer”. A database stores data so that information can be produced from it on demand.5Recap
An organised collection of inter-related data.
Software to create, manage and store a database in digital form.
Every record has the same agreed shape.
The pieces in a record are about the same thing.
Which of these is the best definition of a database?
MySQL is an example of…
A school stores each student's address in the fee register, the library register and the transport register. Which advantage of a DBMS is being lost?