Past ExamsRwanda ICT preparation

Database Administrator calculations with worked answers

Database work involves a handful of calculations that decide whether a system will cope. How much usable storage an array gives, how long a backup or restore will take across the network, and how an operation scales as rows multiply. Each example below shows the working, and every figure was recalculated by independent code before publication.

How this guide was made

Written for this site with AI assistance, then checked automatically before publishing. The topic table, sample questions, worked examples and study plan are generated from this site’s question bank: each worked example is recalculated by separate code, and each sample answer says where it came from.

The guide deliberately states no salaries, grades, pass marks or exam dates. Those change, and they could not be checked here, so take them from the advert itself.

This site is independent and is not affiliated with MIFOTRA or any employer.

Worked examples

Try each one on paper first. Every figure is generated and then recalculated by separate code before it is published.

  1. Usable space in RAID 1

    A server has 2 × 2 TB disks in RAID 1. How much usable capacity is there, and what failure can it survive?

    Show the working
    1. RAID 1 mirrors two disks, so you get the capacity of one.
    2. Usable = 2 TB
    3. It survives one disk failure.

    Answer: 2 TB; survives one disk failure

  2. Worst-case comparisons in a binary search

    A sorted array holds 65536 records. In the worst case, how many comparisons does a binary search need, and how many would a linear search need?

    Show the working
    1. Each binary-search comparison halves what is left, so the worst case is ⌊log₂ n⌋ + 1 comparisons.
    2. log₂(65536) ≈ 16, so ⌊16⌋ + 1 = 17
    3. A linear search may have to check every record: 65536 comparisons. That gap is what O(log n) versus O(n) means in practice.

    Answer: 17 comparisons (binary) versus 65536 (linear)

  3. How long a file takes to transfer

    How long does a 250 MB file take to copy over a 10 Mbps link? Use decimal units (1 GB = 1,000 MB) and ignore protocol overhead.

    Show the working
    1. Storage is sized in bytes, link speed in bits. Multiply megabytes by 8 to get megabits.
    2. 250 MB × 8 = 2000 Mb
    3. Time = 2000 Mb ÷ 10 Mbps = 200 s ≈ 3.33 minutes
    4. Real transfers take longer: TCP/IP headers, retransmissions and disk speed all eat into the link rate.

    Answer: 3.33 minutes

  4. Usable space in RAID 10

    A server has 6 × 2 TB disks in RAID 10. How much usable capacity is there, and what failure can it survive?

    Show the working
    1. RAID 10 stripes across mirrored pairs, so half the disks count: (n ÷ 2) × size.
    2. Usable = 6 TB
    3. It survives one failure per mirrored pair.

    Answer: 6 TB; survives one failure per mirrored pair

  5. Worst-case comparisons in a binary search

    A sorted array holds 100000 records. In the worst case, how many comparisons does a binary search need, and how many would a linear search need?

    Show the working
    1. Each binary-search comparison halves what is left, so the worst case is ⌊log₂ n⌋ + 1 comparisons.
    2. log₂(100000) ≈ 16.61, so ⌊16.61⌋ + 1 = 17
    3. A linear search may have to check every record: 100000 comparisons. That gap is what O(log n) versus O(n) means in practice.

    Answer: 17 comparisons (binary) versus 100000 (linear)

  6. How long a file takes to transfer

    How long does a 700 MB file take to copy over a 1000 Mbps link? Use decimal units (1 GB = 1,000 MB) and ignore protocol overhead.

    Show the working
    1. Storage is sized in bytes, link speed in bits. Multiply megabytes by 8 to get megabits.
    2. 700 MB × 8 = 5600 Mb
    3. Time = 5600 Mb ÷ 1000 Mbps = 5.6 s ≈ 5.6 seconds
    4. Real transfers take longer: TCP/IP headers, retransmissions and disk speed all eat into the link rate.

    Answer: 5.6 seconds

  7. Usable space in RAID 5

    A server has 4 × 2 TB disks in RAID 5. How much usable capacity is there, and what failure can it survive?

    Show the working
    1. RAID 5 spends one disk’s worth of space on parity: (n − 1) × size.
    2. Usable = 6 TB
    3. It survives one disk failure.

    Answer: 6 TB; survives one disk failure

  8. Worst-case comparisons in a binary search

    A sorted array holds 5000 records. In the worst case, how many comparisons does a binary search need, and how many would a linear search need?

    Show the working
    1. Each binary-search comparison halves what is left, so the worst case is ⌊log₂ n⌋ + 1 comparisons.
    2. log₂(5000) ≈ 12.29, so ⌊12.29⌋ + 1 = 13
    3. A linear search may have to check every record: 5000 comparisons. That gap is what O(log n) versus O(n) means in practice.

    Answer: 13 comparisons (binary) versus 5000 (linear)

Why these calculations matter to a database administrator

Storage capacity decides whether a data volume fits and what failure it survives, which matters more for databases than for most workloads because the write pattern is unforgiving. Transfer time tells you whether a restore fits inside the recovery window you promised, which is the number that matters during an outage. Search efficiency is the intuition behind indexing: the difference between scanning every row and finding one directly is the same difference as between a linear and a logarithmic search.

Turning the numbers into decisions

Size storage for growth, not for today, and remember that indexes, logs and temporary space consume it alongside the data. When a restore calculation exceeds the downtime the organisation accepts, the answer is not a faster network alone: it may be more frequent log backups, a standby replica or restoring the critical tables first.

Common questions

Why does RAID choice matter so much for databases?

Databases write constantly, often in small blocks, and parity levels pay a write penalty for every change. The usable capacity is only half the decision; the write behaviour is the other half.

How do I estimate a restore time realistically?

Measure it. Calculate first to size the window, then run a real restore and compare. The gap between the two is the number worth knowing before an incident, not during one.

More Database Administrator guides