Question 4 (6 marks)
Consider the SQL table definition:
create table Tab (
id integer,
code char(8),
avg real,
primary key(id)
);
Assume that:
- integer values are 4 bytes long
- real values are 8 bytes long
- char(X) values occupy X bytes
- each tuple has a 4-byte header before the data
- pages are are B = 4KB in size
- each page has a 96-byte header; the rest of the page holds tuples
- there are r = 10000 tuples in the Tab table
Calculate the following:
R = the size of each tuple (in bytes)
c = the number of tuples in each page
b = the total number of pages needed to store Tab tuples
State all assumptions. Show all working.
Instructions:
- Type your answer to this question into the file called q4.txt
- Submit via: give cs9315 exam_q4 q4.txt
or via: Webcms3 > exams > Final Exam > Q4 submission > Make Submission
End of Question
Consider the SQL table definition:
create table Tab ( id integer, code char(8), avg real, primary key(id) );
Assume that:
- integer values are 4 bytes long
- real values are 8 bytes long
- char(X) values occupy X bytes
- each tuple has a 4-byte header before the data
- pages are are B = 4KB in size
- each page has a 96-byte header; the rest of the page holds tuples
- there are r = 10000 tuples in the Tab table
Calculate the following:
R = the size of each tuple (in bytes)
c = the number of tuples in each page
b = the total number of pages needed to store Tab tuples
State all assumptions. Show all working.
Instructions:
- Type your answer to this question into the file called q4.txt
- Submit via: give cs9315 exam_q4 q4.txt
or via: Webcms3 > exams > Final Exam > Q4 submission > Make Submission