Question 1 |
Consider a database of fixed-length records, stored as an ordered file. The database
has 25,000 records, with each record being 100 bytes, of which the primary key
occupies 15 bytes. The data file is block-aligned in that each data record is fully
contained within a block. The database is indexed by a primary index file, which
is also stored as a block-aligned ordered file. The figure below depicts this indexing
scheme.

Suppose the block size of the file system is 1024 bytes, and a pointer to a block occupies 5 bytes. The system uses binary search on the index file to search for a record with a given key. You may assume that a binary search on an index file of b blocks takes \left \lceil \log_2 b \right \rceil block accesses in the worst case.
Given a key, the number of block accesses required to identify the block in the data file that may contain a record with the key, in the worst case, is _____

Suppose the block size of the file system is 1024 bytes, and a pointer to a block occupies 5 bytes. The system uses binary search on the index file to search for a record with a given key. You may assume that a binary search on an index file of b blocks takes \left \lceil \log_2 b \right \rceil block accesses in the worst case.
Given a key, the number of block accesses required to identify the block in the data file that may contain a record with the key, in the worst case, is _____
4 | |
6 | |
8 | |
16 |
Question 1 Explanation:
Question 2 |
Consider the following table named Student in a relational database. The primary
key of this table is rollNum.
\begin{array}{|c|c|c|c|} \hline \\ rollNum&name&gender&marks \\ \hline 1&Naman&M&62\\ \hline 2&Aliya&F&70 \\ \hline 3&Aliya &F&80 \\ \hline 4&James&M&82\\ \hline 5&Swati&F&65\\ \hline \end{array}
The SQL query below is executed on this database.
The number of rows returned by the query is ______
\begin{array}{|c|c|c|c|} \hline \\ rollNum&name&gender&marks \\ \hline 1&Naman&M&62\\ \hline 2&Aliya&F&70 \\ \hline 3&Aliya &F&80 \\ \hline 4&James&M&82\\ \hline 5&Swati&F&65\\ \hline \end{array}
The SQL query below is executed on this database.
SELECT *
FROM Student
WHERE gender = 'F' AND
marks > 65;
The number of rows returned by the query is ______
0 | |
1 | |
2 | |
3 |
Question 2 Explanation:
Question 3 |
Which one of the options given below refers to the degree (or arity) of a relation in
relational database systems?
Number of attributes of its relation schema. | |
Number of tuples stored in the relation. | |
Number of entries in the relation. | |
Number of distinct domains of its relation schema. |
Question 3 Explanation:
Question 4 |
Consider the relational database with the following four schemas and their respective instances.

The number of rows returned by the above SQL query is ___

The number of rows returned by the above SQL query is ___
1 | |
2 | |
4 | |
8 |
Question 4 Explanation:
Question 5 |
Let R_i(z) and W_i(z) denote read and write operations on a data element z by a transaction T_i, respectively. Consider the schedule S with four transactions.
S: R_4(x)R_2(x)R_3(x)R_1(y)W_1(y)W_2 (x)W_3 (y)R_4(y)
Which one of the following serial schedules is conflict equivalent to S?
S: R_4(x)R_2(x)R_3(x)R_1(y)W_1(y)W_2 (x)W_3 (y)R_4(y)
Which one of the following serial schedules is conflict equivalent to S?
T_1\rightarrow T_3\rightarrow T_4\rightarrow T_2 | |
T_1\rightarrow T_4\rightarrow T_3\rightarrow T_2 | |
T_4\rightarrow T_1\rightarrow T_3\rightarrow T_2 | |
T_3\rightarrow T_1\rightarrow T_4\rightarrow T_2 |
Question 5 Explanation:
There are 5 questions to complete.