An index in a DBMS is said to be dense if an index entry appears for every
search-key value in the indexed file. Otherwise it is called a sparse index. Consider
the following two statements.
S1: A hash index must be a dense index
S2: A π΅+ tree index can be a sparse index
Which one of the following options is correct?

Step 1: Recall the definitions. An index is dense if it has one index entry for every distinct search-key value that occurs in the data file. An index is sparse if it has index entries for only some of the search-key values (typically one entry per data block), relying on the data being physically sorted on that key so the remaining records can be found by scanning forward from the pointed-to block.
Step 2: Examine S1 - 'A hash index must be a dense index'. A hash index works by applying a hash function \(h(K)\) to a search key \(K\) to directly compute the bucket address where the corresponding record pointer is stored. Because the data file is not maintained in any sorted order with respect to the key (records with 'nearby' hash values are not physically near each other), there is no way to infer the location of a record from the location of another record. Every single search-key value that exists in the file must therefore have its own explicit entry in the hash structure, or that record could never be retrieved by the index. This means a hash index is inherently dense. So S1 is true.
Step 3: Examine S2 - 'A B+ tree index can be a sparse index'. A B+ tree index can be built as a primary index on a data file that is sequentially ordered (sorted) on the indexing attribute. In that case it is common and efficient to store only one index entry per block (usually pointing to the first/smallest key in that block) rather than one entry per record. When a search is performed, the tree is used to locate the correct block, and then the block is scanned sequentially to find the exact record. This is a valid sparse organization for a B+ tree primary index, so a B+ tree index can indeed be sparse. So S2 is true.
Step 4: Combine the results. Since S1 is true and S2 is true, both statements hold.
\[ \boxed{\text{Answer: (A) Both S1 and S2 are true}} \]
A schedule of three database transactions \(T_1\), \(T_2\), and \(T_3\) is shown. \(R_i(A)\) and \(W_i(A)\) denote read and write of data item A by transaction \(T_i\), \(i = 1, 2, 3\). The transaction \(T_1\) aborts at the end. Which other transaction(s) will be required to be rolled back?

A schedule of three database transactions \(T_1\), \(T_2\), and \(T_3\) is shown. \(R_i(A)\) and \(W_i(A)\) denote read and write of data item A by transaction \(T_i\), \(i = 1, 2, 3\). The transaction \(T_1\) aborts at the end. Which other transaction(s) will be required to be rolled back?

Consider the following database tables of a sports league. player (\( pid \), \( pname \), \( age \)) coach (\( cid \), \( cname \)) team (\( tid \), \( tname \), \( city \), \( cid \)) members (\( pid \), \( tid \)) An instance of the table and an SQL query are given.
Player table

coach table:

team table:

members table:

SQL query: \[ {SELECT MIN(P.age)} \] \[ {FROM player P} \] \[ {WHERE P.pid IN (} \] \[ { SELECT M.pid} \] \[ { FROM team T, coach C, members M} \] \[ { WHERE C.cname = 'Mark'} \] \[ { AND T.cid = C.cid} \] \[ { AND M.tid = T.tid)} \] The value returned by the given SQL query is _________. (Answer in integer)
A database has 25,000 fixed-length records of 100 bytes (primary key 15 bytes). The data file is block-aligned so each record is fully contained within a block. The file is indexed by a primary index file, also block-aligned and ordered. Block size is 1024 bytes and a block pointer is 5 bytes. Each index entry stores the blockβs anchor key (15 bytes) and a pointer (5 bytes). Binary search on an index file of \(b\) blocks needs \(\lceil \log_2 b \rceil\) block accesses in the worst case. Given a key, the number of block accesses required to identify the data file block that may contain the record, in the worst case, is ____________.
SELECT * FROM Student WHERE gender = 'F' AND marks > 65;The number of rows returned by this query is: