Database-Management-System
August 29, 2024Database-Management-System
August 29, 2024Database-Management-System
|
Question 413
|
Suppose that we have an ordered file with r = 30000 records stored on a disk with block size B = 1024 bytes. If file records are of fixed size and are unspanned with record length R = 100 bytes, the blocking factor for the file and the number of blocks needed for the file are __________ and _________ respectively
|
110, 3000
|
|
|
10, 3000
|
|
|
110, 30000
|
|
|
10, 300ly.
|
Question 413 Explanation:
File size = 30,000 records
Block size = 1024 Bytes
Record size = 100 Bytes
No. of records that can be stored in one Block =1024B/100B
=⎣10.24⎦
=10 records
(Note: We take floor because file records are given as unspanned.)
Block size = 1024 Bytes
Record size = 100 Bytes
No. of records that can be stored in one Block =1024B/100B
=⎣10.24⎦
=10 records
(Note: We take floor because file records are given as unspanned.)
→ No. of Blocks needed for file =
10 records requires ——- 1 Block
1 record requires ——- 1/10 Block
30,000 records ——- 30000/10 Block = 3000 Blocks
Hence option B is correct.
Correct Answer: B
Question 413 Explanation:
File size = 30,000 records
Block size = 1024 Bytes
Record size = 100 Bytes
No. of records that can be stored in one Block =1024B/100B
=⎣10.24⎦
=10 records
(Note: We take floor because file records are given as unspanned.)
Block size = 1024 Bytes
Record size = 100 Bytes
No. of records that can be stored in one Block =1024B/100B
=⎣10.24⎦
=10 records
(Note: We take floor because file records are given as unspanned.)
→ No. of Blocks needed for file =
10 records requires ——- 1 Block
1 record requires ——- 1/10 Block
30,000 records ——- 30000/10 Block = 3000 Blocks
Hence option B is correct.
