RAID, Record Representation




CS157b

Chris Pollett

Feb 3, 2020

Outline

Intermittent Failures

Checksums

Stable Storage

Implementing Stable Storage

Failure Model for Disks

Mirroring as a Redundancy Technique

Quiz

Which of the following statements is true?

  1. Secondary storage and volatile memory are the same thing.
  2. Resetting 0 to 1 on a SSD can be done at the bit level.
  3. A disk controller is a small processor in an HDD capable of controlling the actuator arm that moves the head assembly on the disk.

Parity Blocks

RAID 4 and Failures

RAID 5

RAID 6

Representing Data in Secondary Storage

How do we store relations and objects to disk?

Example

Consider trying to implement a record format for the table created by the following SQL statement:

CREATE TABLE MovieStar(
   name CHAR(30) PRIMARY KEY, 
   address VARCHAR(255),
   gender CHAR(1),
   birthdate DATE
);

Representing Data Elements I

We now discuss how to represent various kinds of data elements:

Representing Data Elements II

Representing Data Elements III

Representing Data Elements IV

Fixed-Length Records

Record Headers

Sometimes need to store addition info besides the value of each field. This data could be things like:

  1. The record schema or a pointer to it.
  2. The length of the record
  3. Timestamp indicating when the data was last modified or read.

Schema Info

MovieStar Record Layout Example

Record:schema reflengthtimestampnameaddressgenderbirthdate
Byte positions:0481244300304316

Packing Fixed-Length Records into Blocks