What a database is for
Why not store everything in a simple file
Imagine that your school records students and their results in a simple text file, one line per student. It works... until two different administrative offices add the same student with a different spelling of their name, or someone changes a grade without anyone else knowing. The file quickly becomes inconsistent, hard to query, and impossible to share properly between several people at the same time.
What a database brings
A database organizes information in a structured way: each type of information has its precise place, with rules that prevent inconsistencies. It notably allows you to:
- store data in a structured way: each student, each grade, each class has a format defined in advance;
- avoid duplicates: the same student is recorded only once, identified unambiguously;
- guarantee consistency: it is impossible to assign a grade to a student who does not exist in the database;
- query quickly: finding "all students with an average above 15" takes a fraction of a second, even among millions of records;
- share at the same time: several people can view or modify the database simultaneously, without one person's changes overwriting another's.
The role of the DBMS
The software that manages a database is called a DBMS (Database Management System). The best known are MySQL, PostgreSQL, and SQLite. It is the DBMS that understands and executes the language you are going to learn in this course: SQL (Structured Query Language), the standard language for creating, querying, and modifying relational databases.
In the rest of this course, we will work with a very simple database: a list of students with their grades.

