Examhaus — Achieve with confidence.

IB Computer Science A3.1: Database fundamentals

New IB Computer Science syllabus · first exams May 2027 · Theme A · SL & HL

A3.1 is the first sub-unit of A3 Databases. It has a single statement, but it is a broad one: what makes a database relational, why organisations use one, and where relational databases struggle.

StatementTopicCommand term
A3.1.1Features, benefits and limitations of a relational databaseExplain
⚠️ Command term alert: "Explain" means giving reasons, not just stating facts. Know the difference between a feature (what a database has) and a benefit (why that helps).

Key points

Features

  • Tables (relations): data in rows (records) and columns (attributes). Each table represents one type of entity.
  • Primary key: uniquely identifies every row. It must be unique and can't be empty (null).
  • Foreign key: a column that references another table's primary key, linking the two tables.
  • Composite key: a primary key made of two or more columns, used when no single column is unique.
  • Relationships: one-to-one, one-to-many or many-to-many links between tables, made through foreign keys.

Benefits

  • Less duplication and redundancy: data is stored once and linked, not retyped.
  • Data integrity and consistency: keys and constraints stop invalid or orphaned records. This is called referential integrity.
  • Efficient retrieval: SQL queries can combine linked tables.
  • Concurrency control and reliable transaction processing: many users can work safely at once.
  • Security features, scalability and strong community support.

Limitations

  • "Big data" scalability: joins across billions of rows are slow, and buying ever bigger servers gets expensive.
  • Unstructured data: images, posts and documents don't fit neatly into fixed columns.
  • Rigid schema: changing the structure later is difficult.
  • Hierarchical data: tree-like data is awkward to store in flat tables.
  • Design complexity.
  • Object-relational impedance mismatch: objects in a program don't map neatly onto tables.

Exam-style question

A school is designing a database to store student enrolments in courses. Explain two benefits of using a relational database for this purpose. [4]

Mark scheme

Award [2] per benefit ([1] for naming it, [1] for relating it to the scenario), any two of:

  • Reduced data duplication: each student's and course's details are stored once and linked through foreign keys in an Enrolments table, rather than retyped for every enrolment. This prevents wasted storage and update errors.
  • Data integrity: constraints, such as a foreign key that requires a valid StudentID, stop the school recording an enrolment for a student who doesn't exist.
  • Efficient retrieval: SQL queries with joins quickly answer questions such as "which students are enrolled in CS101?".

Common mistakes that cost marks

  • Listing benefits without explaining them, or without linking them to the scenario.
  • Confusing a feature with a benefit. "Uses primary keys" is a feature; "every record can be uniquely identified, so there are no duplicates" is a benefit.
  • Treating "reduced redundancy" and "data integrity" as the same thing. They are different benefits.

Frequently asked questions

What's the difference between a primary key and a foreign key?
A primary key uniquely identifies each row in its own table. A foreign key is a column in another table that refers to that primary key, linking the two tables.

When is a relational database a poor choice?
For very large or unstructured data, such as social media posts and images, where non-relational (NoSQL) databases scale more easily. NoSQL is covered in A3.4 (HL).


Go further