关键词 > INFS2200/7903

INFS2200/7903 – Relational Database Systems Tutorial 3

发布时间:2022-08-30

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

INFS2200/7903 – Relational Database Systems

Tutorial 3

Question 1 Consider a disk with the following characteristics:

•   Block size B = 512 bytes,

•   Number of blocks per track = 20,

•   Number of tracks per surface = 400.

•   A disk consists of 15 double-sided platters.

A. What is the total capacity of a track?

B.  How many cylinders are there?

C. What is the total capacity of a cylinder?

D. What is the total capacity of a disk?

E.  Suppose the disk drive rotates the disk at a speed of 3000 rpm (revolutions per minute):

a.  What is the transfer rate in bytes/msec?

b.  What is the block transfer time (btt) in msec?

c.  What is the average rotational delay (rd) in msec?

F.  Suppose the average seek time is 30 msec. How much time does it take (on the average) in msec to locate and transfer a single block given its block address?

G. Calculate the average time it would take to transfer 20 random blocks and compare it with the time it would take to transfer 20 consecutive blocks.

Question 2 A file has N = 20000 STUDENT records of fixed-length. Each record has the following fields:

NAME (30 bytes), SSN (9 bytes), ADDRESS (40 bytes), PHONE (9 bytes),          BIRTHDATE (8 bytes), SEX (1 byte), MAJORDEPTCODE (4 bytes),                     MINORDEPTCODE (4 bytes), CLASSCODE (4 bytes), and DEGREEPROGRAM (3 bytes)

An additional byte is used as a deletion marker. The file is stored on a disk with block size B = 512 bytes.

A. Calculate the record size R in bytes.

B. Calculate the blocking factor bfr and the number of file blocks b assuming an unspanned organization.