






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Alex Jewell CSCI- Database Systems Professor Zaki 3/29/
10 surfaces 100,000 tracks 1,000 sectors 1024 bytes
10 ร 100000 ร 1000 ร 1024 ร .8 = 1.024 ร 10^12 ๐๐ฆ๐ก๐๐
100,000 tracks 1 + .0002 N ms for N tracks
100,000 ร .0002 + 1 = 21๐๐
10,000rpm 60 ๐ 10,000๐๐๐๐
NOTE: I used the following sizes. SQL Date = 10 bytes, SQL Time = 8 bytes, based on values found in the book.
4 byte pointer, 1 char, 15 char string, 2 byte int, SQL Date, SQL Time
3 static fields of 10 bytes each. 30 bytes.
Integer, record length. 4 bytes
2 integer pointers to the last 2 of the 3 variable length fields. 8 bytes
Average of name 10-50 bytes. 30 bytes.
Average of address 20-80 bytes. 50 bytes.
Average of history 0-1000 bytes. 500 bytes.
30 + 4 + 8 + 30 + 50 + 500 = 622 ๐๐ฆ๐ก๐๐
i) Deleting each node from 23 requires removing nodes as the reach less than 50% capacity. This is rather straightforward until we reach the last number to remove which will cause the parent node and then the root node to reach less than 50% capacity.
13
7
2 3 5 7 11 13 17 19 47
19
As you can see, when 47 is removed, 19 is combined with the node to the left, and the parent node reaches less than 50%, and removing it would cause the root node to have less than 50% capacity. So the root node is combined down with the node containing 7.
7 13
2 3 5 7 11 13 17 19
0000 0001
3
0010 0011
3
0100 0101
3
0110 0111
3
1000 1001
3
1010 1011
3
1100 1101
3
1110 1111
3
0000 1000
0001 10001
0010 1010
0011 1011
0100 1100
0101 1101
0110 1110
0111 1111
b) ๐๐=๐๐ ๐พ
๐ ๐๐=10 ๐ =
d) ๐๐=๐๐(๐) โ ๐
๐ ๐๐=20 ๐ ๐ ๐ max ๐ ๐, ๐ , ๐ ๐, ๐
max ๐ ๐, ๐ , ๐ ๐, ๐
f) ๐๐ >๐๐ ๐
๐ ๐๐>10 ๐ = ๐ ๐ /
h) ๐๐=๐๐ ๐จ๐ต๐ซ ๐>๐ ๐พ
๐ ๐๐=10 ๐ด๐๐ท ๐>2 ๐ =
a) ๐๐=๐ ๐จ๐ต๐ซ ๐=๐ ๐จ๐ต๐ซ ๐ =๐(๐น) i) Table Scan: ๐ต ๐ = 1000 ๐ผ/๐โฒ๐
ii) Index scan on a: (^) ๐ ๐ ๐ต ๐ ,๐ = 100020 = 50 ๐ผ/๐โฒ๐
iii) Index scan on b: (^) ๐ ๐ ๐ ๐ ,๐ = 50001000 = 5 ๐ผ/๐โฒ๐
iv) Index scan on d: (^) ๐ ๐ ๐ ๐ ,๐ = 5000500 = 10 ๐ผ/๐โฒ๐
ANSWER): Index scan on b: 5
b) ๐๐=๐ ๐จ๐ต๐ซ ๐=๐ ๐จ๐ต๐ซ ๐โฅ๐(๐น) i) Table Scan: ๐ต ๐ = 1000 ๐ผ/๐โฒ๐
ii) Index scan on a: (^) ๐ ๐ ๐ต ๐ ,๐ = 100020 = 50 ๐ผ/๐โฒ๐
iii) Index scan on b: (^) ๐ ๐ ๐ ๐ ,๐ = 50001000 = 5 ๐ผ/๐โฒ๐
iv) Index scan on c: ๐ ๐ 3 = 50003 โ 1667 ๐ผ/๐โฒ๐
ANSWER): Index scan on b: 5
c) ๐๐=๐ ๐จ๐ต๐ซ ๐โค๐ ๐จ๐ต๐ซ ๐โฅ๐(๐น) i) Table Scan: ๐ต ๐ = 1000 ๐ผ/๐โฒ๐
ii) Index scan on a: (^) ๐ ๐ ๐ต ๐ ,๐ = 100020 = 50 ๐ผ/๐โฒ๐
iii) Index scan on b: ๐ ๐ 3 = 50003 โ 1667 ๐ผ/๐โฒ๐
iv) Index scan on c: ๐ ๐ 3 = 50003 โ 1667 ๐ผ/๐โฒ๐
ANSWER): Index scan on a: 50