โ† Database Technology

Learn / Database Technology

DBT: 1 - Storage

Practice questions on memory hierarchy, disk mechanics, I/O cost model, failures, and RAID.

Learning path

0%

0 of 10 sections marked complete ยท about 53 minutes

Learning objectives

What you will be able to explain

  • Which storage medium typically has the lowest access latency?
  • Which of the following are non-volatile storage?
  • The 'Memory Wall' refers to the major gap between which components?
  • Locality of Access: True or False
  • Cache-hit-ratio calculation
  • Who primarily moves data between main memory and CPU caches?

Section 01

Which storage medium typically has the lowest access latency? to The 'Memory Wall' refers to the major gap between which components?

01

Which storage medium typically has the lowest access latency?

Correct answer: CPU Registers.

02

Which of the following are non-volatile storage?

Correct answers: HDD, SSD, Magnetic Tape.

Guided checkpoint

Select all that apply.

03

The 'Memory Wall' refers to the major gap between which components?

Correct answer: Main Memory and Processor performance.

Section 02

Locality of Access: True or False to Who primarily moves data between main memory and CPU caches?

01

Locality of Access: True or False

Answers: 1=False (spatial), 2=False (temporal), 3=True, 4=True.

Guided checkpoint

Mark each statement as True or False.

02

Cache-hit-ratio calculation

Correct answer: 0.95 (95%).

Guided checkpoint

A system performs 10,000 requests. 9,500 are cache hits and 500 are misses.

cache-hit-ratio = nb_hits / (nb_hits + nb_misses)

Enter the ratio as a decimal value.

03

Who primarily moves data between main memory and CPU caches?

Correct answer: Hardware/CPU.

Section 03

Which are mechanical parts of a magnetic disk assembly? to Megatron 747: disk capacity

01

Which are mechanical parts of a magnetic disk assembly?

Correct answers: Platters, Read/Write Heads, Disk Controller.

Guided checkpoint

Select all that apply.

02

What is a cylinder in hard disk mechanics?

Correct answer: a set of tracks across all platters with the same radius.

03

Megatron 747: disk capacity

Correct answer: 1 TB.

Guided checkpoint

Compute total capacity for: 16 surfaces, 65,536 tracks/surface, 256 sectors/track, 4,096 bytes/sector.

Return the result in TB where 1 TB = 2^40 bytes.

total_bytes = surfaces * tracks * sectors * bytes_per_sector

Section 04

Can standard HDD heads typically read different surfaces in parallel? to What is the usual assumption for average rotational latency?

01

Can standard HDD heads typically read different surfaces in parallel?

Correct answer: No, they move together and typically cannot read in parallel.

02

Rotational latency: full rotation time

Correct answer: about 8.33 ms.

Guided checkpoint

A disk rotates at 7,200 RPM. Compute the time for one full rotation in milliseconds.

rotations_per_second = 7200 / 60
time_per_rotation = 1 / rotations_per_second

03

What is the usual assumption for average rotational latency?

Correct answer: time for half a rotation.

Section 05

Average Seek Time Calculation to What is the core assumption of the I/O model for DB analysis?

01

Average Seek Time Calculation

Path of Calculation: 1. Average distance = 65,536 / 3 = 21,845.33 tracks 2. Seek time = 1 + (21,845.33 / 4000) 3. 1 + 5.46 = 6.46 ms Correct answer: 6.46 ms.

Guided checkpoint

Using the Megatron 747 model, assume seek time is defined as 1 ms + (tracks_travelled / 4000) ms.

If the disk has 65,536 tracks and the average seek distance is 1/3 of the tracks, calculate the average seek time.

02

What is required to modify a disk block?

Correct answer: read -> modify in RAM -> write back.

03

What is the core assumption of the I/O model for DB analysis?

Correct answer: Disk I/O dominates cost.

Section 06

Which techniques can reduce disk access time or improve throughput? to Match disk failure types

01

Which techniques can reduce disk access time or improve throughput?

Correct answers: A, B, D, E.

Guided checkpoint

Select all that apply.

02

Average case disk latency

Correct answer: 10.76 ms.

Guided checkpoint

Compute latency to read a 16 KB block with: seek = 6.46 ms, rotational = 4.17 ms, transfer = 0.13 ms.

latency = seek + rotational + transfer

03

Match disk failure types

Correct mapping: 1-C, 2-B, 3-A.

Guided checkpoint

Match each failure type to the correct description.

Section 07

If you use nn independent parity bits for a sector, what is the probability that an error will NOT be detected? to Match RAID levels to their characteristics

01

If you use nn independent parity bits for a sector, what is the probability that an error will NOT be detected?

Correct answer: 1/(2^n).

02

In the `Stable Storage` writing protocol, why is data stored in two sectors (XL and XR)?

Correct answer: redundancy for recoverability.

03

Match RAID levels to their characteristics

Correct mapping: 1-B, 2-A, 3-C, 4-D.

Section 08

Which RAID levels protect against at least one disk failure? to What is the minimum number of disks required for RAID 6?

01

Which RAID levels protect against at least one disk failure?

Correct answers: RAID 1, RAID 4, RAID 5, RAID 6.

Guided checkpoint

Select all that apply.

02

RAID 5 storage efficiency

Correct answer: 80%.

Guided checkpoint

A RAID 5 array has 5 identical disks. Compute storage efficiency in percent.

efficiency = (N - 1) / N

03

What is the minimum number of disks required for RAID 6?

Correct answer: 4.

Section 09

Main advantage of RAID 5 over RAID 4? to MTTDL for system without RAID

01

Main advantage of RAID 5 over RAID 4?

Correct answer: no single parity-disk bottleneck.

02

What does MTTF represent for a disk?

Correct answer: average lifespan of a single disk.

03

MTTDL for system without RAID

Correct answer: 500 hours.

Guided checkpoint

System has 100 disks. Each disk MTTF is 50,000 hours. With no RAID, any disk failure causes data loss.

MTTDL = MTTF_per_disk / N_disks

Section 10

Why do DBMSs often use their own memory management? to Best use case for tertiary storage (e.g., magnetic tape)?

01

Why do DBMSs often use their own memory management?

Correct answer: DBMS-controlled buffering can exploit workload knowledge.

02

SSD properties: True or False

Answers: True, False, True, True.

Guided checkpoint

Mark each statement as True or False.

03

Best use case for tertiary storage (e.g., magnetic tape)?

Correct answer: long-term storage of very large, rarely accessed data.

Knowledge check

Turn understanding into recall.

The quiz now follows the same concepts in scored form. You can return to this lesson from the quiz whenever a gap appears.