Skip to content

October 18, 2026

Databases and spreadsheets

ZIMSEC O Level · Computer Science · Form 2, Form 3, Form 4

Databases

A database stores organised data so it can be searched and sorted quickly.

  • A table holds records (rows) made up of fields (columns).
  • Each field has a data type: text, number, date/time, Boolean (yes/no), currency.
  • A primary key uniquely identifies each record (e.g. StudentID).
  • Queries search for records that meet criteria, e.g. Form = "4" AND Mark > 70.
  • Reports present selected data in a printable format; forms make data entry easier.

Spreadsheets

A grid of cells for calculations, identified by column letter and row number (B4).

  • Formulas start with =, e.g. =B2*C2.
  • Functions: SUM, AVERAGE, MAX, MIN, COUNT, IF.
  • Relative references change when copied; absolute references ($B$1) stay fixed.
  • Charts show data visually; sorting and filtering organise it.

Worked example: Write a formula in D2 to show "Pass" if the mark in C2 is 50 or more.

=IF(C2>=50,"Pass","Fail")

Uses

School records, stock control, payroll, hospital records, budgets and modelling ("what if" questions).

Exam tip: Use an absolute reference for a single value used in many formulas, like a tax rate or exchange rate.

Check yourself

  1. What is a primary key?
  2. Write a formula to find the average of cells B2 to B11.
  3. Why is $D$1 used instead of D1 in some formulas?
Show answers
  1. A field that uniquely identifies each record.
  2. =AVERAGE(B2:B11)
  3. It is an absolute reference, so it does not change when the formula is copied.

Questions about this topic (0)

No questions about this topic yet.

Leave a Reply

Your email address will not be published. Required fields are marked *