Databases · 5 question types
Past paper frequency (2018 to 2024)
This topic accounts for approximately 4% of your exam marks.
SQL SELECT queries and database structure (tables, fields, records) appear as 4 to 6 mark questions.
A database is an organised collection of data, stored on secondary storage in a way that lets a program retrieve, update and analyse it efficiently.
The IGCSE syllabus focuses on single-table databases: just one rectangular table of data with named columns (called fields) and one row per real-world item (called records).
Text files were covered in topic 23. The same data could be stored either way; databases offer several advantages.
| Feature | Plain text file | Database |
|---|---|---|
| Data organisation | Lines of text; the program decides what each line means | Named fields, rows, and column data types |
| Searching | Read every line in turn (linear) | Indexed lookup; very fast even with millions of records |
| Concurrent access | Awkward; one writer at a time | Built-in support for many users at once |
| Validation | Done by the program reading the file | Validation rules on each field at the database level |
| Security | Limited; depends on the OS | Per-user access controls, encrypted at rest, audited |
| Best for | Small amounts of structured text data | Large, structured data accessed by many users |
For a school's collection of student grades, a database is almost always the right tool. For a small configuration file, a plain text file may be enough.