GATE 2005 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2005

203 questions

MCQ 2031-mark 203

Questions 171–175 of 203

Q171File System1 markMCQ−0.33 if wrong
In a computer system, four files of size 11050 bytes, 4990 bytes, 5170 bytes and 12640 bytes need to be stored. For storing these files on disk, we can use either 100 byte disk blocks or 200 byte disk blocks (but can't mix block sizes). For each block used to store a file, 4 bytes of bookkeeping information also needs to be stored on the disk. Thus, the total space used to store a file is the sum of the space taken to store the file and the space taken to store the book keeping information for the blocks allocated for storing the file. A disk block can store either bookkeeping information for a file or data from a file, but not both. What is the total space required for storing the files using 100 byte disk blocks and 200 byte disk blocks respectively?

Q172File System1 markMCQ−0.33 if wrong
A B-Tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then the maximum number of nodes that could be newly created in the process are

Q173File System1 markMCQ−0.33 if wrong
Which one of the following is a key factor for preferring B+B^{+} - trees to binary search trees for indexing database relations?

Q174Transaction1 markMCQ−0.33 if wrong
A company maintains records of sales made by its salespersons and pays them commission based on each individual's total sales made in a year. This data is maintained in a table with following schema:
salesinfo = (salespersonid, totalsales, commission)
In a certain year, due to better business results, the company decides to further reward its salespersons by enhancing the commission paid to them as per the following formula:
If commission ≤50000\leq 50000, enhance it by 2%
If 50000 < commission ≤100000\leq 100000, enhance it by 4%
If commission > 100000, enhance it by 6%
The IT staff has written three different SQL scripts to calculate enhancement for each slab, each of these scripts is to run as a separate transaction as follows:
T1
 Update salesinfo
Set commission = commission * 1.02
Where commission < = 50000;

T2
Update salesinfo
Set commission = commission * 1.04
Where commission > 50000 and commission is < = 100000; 

T3
 Update salesinfo
Set commission = commission * 1.06
Where commission > 100000;

Which of the following options of running these transactions will update the commission of all salespersons correctly

Q175Transaction1 markMCQ−0.33 if wrong
Amongst the ACID properties of a transaction, the 'Durability' property requires that the changes made to the database by a successful transaction persist