CS157b
Chris Pollett
Jan 31, 2018
Suppose rather than have a single redundant disk we had two redundant disks (common in settings like Hadoop). What would be the mean time to data loss?
Work out your answer. If you haven't already signed up for an account, sign up for an account on the discussion board (you need to create an account on https://www.yioop.com/, them add the discussion group).
Post your solutions to the Jan 31 In-Class Exercise Thread.
Disk1blk1: 1001 Disk2blk1: 1111 Disk3blk1: ???? ParityBlk1:0010Then Disk3blk1 must be:0100
How do we store relations and objects to disk?
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 );
We now discuss how to represent various kinds of data elements:
Record: | name | address | gender | birthdate | |
---|---|---|---|---|---|
Byte positions: | 0 | 30 | 286 | 286 | 297 |
Sometimes need to store addition info besides the value of each field. This data could be things like:
Record: | schema ref | length | timestamp | name | address | gender | birthdate | |
---|---|---|---|---|---|---|---|---|
Byte positions: | 0 | 4 | 8 | 12 | 44 | 300 | 304 | 316 |
header | Rec `1` | ... | Rec `n` |