Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›IB Computer Science
  3. ›A3 Databases
  4. ›A3.1 Database fundamentals

IB Computer Science · A3 · Databases

A3.1 Database fundamentals

Describe what a database is, explain the role of a DBMS, compare flat file and relational databases, and identify common data types.

  • 4 min read
  • 5 parts
  • 10 questions
  • Draft
Start a Quick 5 on this topic→Jump to the 10 questions
1/5A database stores organised data for many uses
  1. 1A database stores organised data for many uses
  2. 2A DBMS controls how users reach the data
  3. 3A flat file keeps all its data in one table
  4. 4Relational databases link tables to avoid repeating data
  5. 5Every field has a data type that limits its values
  6. Check your recall
  7. Practice: 10 questions
1

Part 1 of 5: A database stores organised data for many uses

Think of a school office that keeps student details, timetables and library loans. Holding them in one organised place makes them easy to find and update. A database is an organised collection of related data held electronically.

Data in a database sits in tables. Each row is a record, which covers one item such as one student. Each column is a field, which holds one kind of fact such as a surname.

Databases are everywhere. A bank keeps accounts, a shop keeps stock and orders, and a hospital keeps patient records. A website keeps login details for every user.

Key terms · tap one for its definition

database

A database is an organised collection of related data held electronically so that it can be retrieved, updated and managed efficiently.

record

A record is one row of a table, holding all the fields for a single item.

field

A field is one column of a table, holding a single kind of fact about every record.

Part 1 done

2

Part 2 of 5: A DBMS controls how users reach the data

Now imagine many staff using those records at once. Something must control who sees what and stop edits from clashing. A database management system (DBMS) is the software that does this job.

Programs and people send requests to the DBMS, which carries them out. It has four main tasks.

  • storing and retrieving data when users ask for it
  • controlling access through accounts and permissions
  • keeping data consistent when several users edit together
  • backing up data and recovering it after a failure

Together these tasks protect data integrity, which means the data stays accurate and consistent.

Common mistake

The DBMS is not the database. The database is the stored data, and the DBMS is the software that manages it.

Key terms · tap one for its definition

database management system

A database management system is software that creates databases and controls how users and programs store, retrieve and change their data.

data integrity

Data integrity is the accuracy, consistency and validity of data throughout its life in a database.

Part 2 done

Quick check

One question on the part you just read

Easy

Identify what a field is in a database table.
Show answer and explanation

Answer: A · Worked explanation

A field is a column, such as Surname, that holds one kind of fact for every record. A row is a record, so describing a field as a row confuses the two terms. Tables joined by keys describe a relational database, and the managing software is the DBMS.
3

Part 3 of 5: A flat file keeps all its data in one table

Before linking tables, consider the simplest design. A flat file database holds all its data in a single table. A teacher’s spreadsheet of students and their subjects is a typical example.

A flat file with one row for each student and subject

StudentAddressSubject
Ana12 Oak RoadMaths
Ana12 Oak RoadPhysics
Ana12 Oak RoadArt
Ben9 Hill LaneMaths
Student
Ana
Address
12 Oak Road
Subject
Maths
Student
Ana
Address
12 Oak Road
Subject
Physics
Student
Ana
Address
12 Oak Road
Subject
Art
Student
Ben
Address
9 Hill Lane
Subject
Maths

Ana’s address is stored three times. This data redundancy wastes space. It also risks inconsistency, because correcting one row and missing another leaves two different addresses.

Flat files work well for small, simple lists. They become awkward as the data grows and more users share it. Each extra subject adds another row of repeated details.

Key terms · tap one for its definition

flat file

A flat file is a database held in a single table, with no links to other tables.

data redundancy

Data redundancy is the unnecessary storage of the same data in more than one place.

Part 3 done

4

Part 4 of 5: Relational databases link tables to avoid repeating data

A relational design solves the repetition by splitting the data. A relational database stores data in several tables that are linked together. Student details go in one table and subjects in another.

The tables are linked through keys. A primary key is a field that identifies each record uniquely, such as a student ID. Another table can store that ID to point back to the right student.

Flat file compared with relational database

FeatureFlat fileRelational
TablesOneSeveral, linked
Repeated dataCommonMinimal
Changing a factEdit every copyEdit once
Suited toSmall, simple listsLarge, connected data
Feature
Tables
Flat file
One
Relational
Several, linked
Feature
Repeated data
Flat file
Common
Relational
Minimal
Feature
Changing a fact
Flat file
Edit every copy
Relational
Edit once
Feature
Suited to
Flat file
Small, simple lists
Relational
Large, connected data

Exam tip

When comparing, address both types on the same feature, such as repetition or ease of updating.

Key terms · tap one for its definition

relational database

A relational database is a database that stores data in linked tables and joins them using shared key fields.

primary key

A primary key is a field, or set of fields, whose value identifies each record in a table uniquely.

Part 4 done

Quick check

One question on the part you just read

Easy

State the role of a database management system.
Show answer and explanation

Answer: C · Worked explanation

A DBMS is the software layer between users and the stored data. It handles storage, retrieval, access control and consistency. The organised collection of data is the database itself, which the DBMS manages but is not the same thing as it. A field that identifies records is a primary key.
5

Part 5 of 5: Every field has a data type that limits its values

Each field also needs rules about the values it may hold. A data type states what kind of value a field stores. The DBMS uses it to check input and to decide how much space to reserve.

Names vary between systems, but five types are common.

  • Integer: whole numbers, such as an age of 16
  • Real: numbers with a fractional part, such as a price of 12.50
  • Text: letters, digits and symbols, such as a name
  • Boolean: true or false, such as whether a book is on loan
  • Date: calendar values, such as a date of birth

Common mistake

Not every number belongs in a number field. Phone numbers are stored as text, because leading zeros must be kept and nobody adds them.

Key term

data type

A data type is the kind of value a field may hold, which determines its permitted values and storage.

Note read

Check your recall[14 marks]

6 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 1.Define[2 marks]

    Define the term database.

    Show mark schemeHide mark scheme

    Model answer

    A database is an organised collection of related data. It is stored so that it can be retrieved and updated efficiently.

    • 1 mark for stating that it is an organised or structured collection of data
    • 1 mark for stating that the data is related and stored so it can be retrieved or updated
  2. 2.Outline[3 marks]

    Outline three tasks carried out by a database management system.

    Show mark schemeHide mark scheme

    Model answer

    A DBMS stores and retrieves data when users ask for it. It controls access using accounts and permissions. It keeps data consistent when several users edit together, and it backs up and recovers data.

    • 1 mark for outlining one task such as storing and retrieving data
    • 1 mark for outlining a second task such as controlling access
    • 1 mark for outlining a third task such as keeping data consistent or backing up and recovering data
  3. 3.Compare[3 marks]

    Compare flat file and relational databases in how they store data that repeats.

    Show mark schemeHide mark scheme

    Model answer

    A flat file keeps all data in one table, so repeated facts such as an address are stored many times. A relational database splits the data into linked tables, so each fact is stored once. Changing a fact therefore needs one edit in a relational database but many in a flat file.

    • 1 mark for stating that a flat file repeats data in one table
    • 1 mark for stating that a relational database stores each fact once in linked tables
    • 1 mark for linking the difference to editing or consistency
  4. 4.State[1 mark]

    State the most suitable data type for a field that records whether a library book is on loan.

    Show mark schemeHide mark scheme

    Model answer

    Boolean.

    • 1 mark for stating Boolean
  5. 5.Explain[2 marks]

    Explain why a phone number is stored as text and not as an integer.

    Show mark schemeHide mark scheme

    Model answer

    A phone number can begin with a zero, which an integer would drop. Nobody performs calculations on phone numbers, so a number type gives no benefit.

    • 1 mark for stating that an integer would lose a leading zero
    • 1 mark for stating that no calculations are done on phone numbers
  6. 6.Explain[3 marks]

    Explain how a DBMS helps to maintain data integrity when several users edit the same records.

    Show mark schemeHide mark scheme

    Model answer

    The DBMS controls who may change the data through accounts and permissions. It keeps the data consistent when edits happen together. It can also restore the data from a backup after a failure, so the data stays accurate.

    • 1 mark for stating that access is controlled through permissions
    • 1 mark for stating that it keeps data consistent during simultaneous edits
    • 1 mark for stating that backup and recovery keep data accurate after a failure

Practice this topic

10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)

0 right0 of 10 answered

Includes the 2 quick checks in the note above.

3.

Easy·Identify[1 mark]

Identify the most suitable data type for a field that records whether a library book is on loan.
Show answer and explanation

Answer: B · Worked explanation

A loan status has only two possible values, true or false, so Boolean suits it. Text would accept any characters, including misspellings, so the DBMS could not check the input as strictly. Integer could hold 1 and 0 but would also accept any other whole number.
4.

Medium·Calculate[2 marks]

A flat file of 200 students stores one row for each student and subject. Each student takes 5 subjects, and every row includes the student’s address. Calculate how many times one student’s address is stored.
Show answer and explanation

Answer: D · Worked explanation

Each of the student’s 5 subjects has its own row, and every row repeats the address, so it is stored 5 times. Storing it once is what a relational design achieves, not a flat file. The value 200 is the number of students, and 1000 is the total number of rows, found by multiplying 200 by 5.
5.

Medium·Identify[1 mark]

A school database holds Name, Form and StudentID for 800 students. Several students share a name or a form. Identify the field best suited to be the primary key.
Show answer and explanation

Answer: A · Worked explanation

A primary key must identify each record uniquely, and a StudentID can be issued so that no two students share one. Name fails because students can share names. Form fails for the same reason. Name and Form together still cannot be guaranteed unique, since two students with the same name may be in one form.
6.

Medium·Determine[1 mark]

A shop stores stock counts in whole items and item weights such as 0.75 kg. Determine the most suitable data types for stock count and weight, in that order.
Show answer and explanation

Answer: C · Worked explanation

A stock count has no fractional part, so integer fits. A weight such as 0.75 needs a fractional part, so real fits. Reversing the pair would force the weight into whole numbers and lose the decimals. Boolean can hold only true or false, so it cannot store a weight.
7.

Medium·Predict[1 mark]

A flat file stores a customer’s address in every order row. The customer moves, and a clerk corrects only some of the rows. Predict the main consequence.
Show answer and explanation

Answer: B · Worked explanation

Repeated data means every copy must be edited, and any copy that is missed keeps the old address. This is the inconsistency risk of data redundancy. A DBMS does not delete orders because an address changes. Changing an address does not alter the key, and a flat file does not turn relational by itself.
8.

Hard·Explain[2 marks]

A library records 3 loans by the same member. Which statement about a relational design for this data is correct?
Show answer and explanation

Answer: D · Worked explanation

A relational design splits the data into linked tables, so the member’s details sit in one record and the loan records point to it through a key. Storing the details three times describes a flat file. Only the primary key must be unique, so a reference to the member can appear in many loan records.
9.

Hard·Distinguish[2 marks]

A student says that a relational database and a DBMS are the same thing. Which response is correct?
Show answer and explanation

Answer: B · Worked explanation

The word relational describes how data is organised, in several linked tables. The DBMS is separate software that creates and manages such a database. Saying they are the same hides this difference. Reversing the roles, so that the DBMS is the data, repeats the common confusion between a database and the software that manages it.
10.

Hard·Determine[2 marks]

A clinic stores a patient ID such as 007345 and the date a patient was admitted. Determine the best data types for these two fields, in that order.
Show answer and explanation

Answer: C · Worked explanation

The ID begins with zeros that an integer would drop, giving 7345, and nobody calculates with an ID, so text is best. An admission date is a calendar value, so the date type is best and lets the DBMS check it. Storing the date as text loses that checking.

Keep going

Next topicA3.2 Database designPrevious topicA2.4 Network security

More in A3 · Databases

  1. A3.1Database fundamentalsNotes · 10 questions
  2. A3.2Database designNotes · 10 questions
  3. A3.3Database programmingNotes · 10 questions
  4. A3.4Alternative databases and warehousesNotes · 10 questions· HL only

All IB Computer Science topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by IB Diploma Programme or any exam board.

On this page

0/5 read

  1. 1A database stores organised data for many uses
  2. 2A DBMS controls how users reach the data
  3. 3A flat file keeps all its data in one table
  4. 4Relational databases link tables to avoid repeating data
  5. 5Every field has a data type that limits its values
  6. Check your recall
  7. Practice: 10 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe