Databases questions

Q13

GATE CS 2020 CSRelational QueriesMCQ1 mark−1/3 if wrong
Consider a relational database containing the following schemas (the tables Catalogue, Suppliers and Parts are shown in the figure).

The primary key of each table is indicated by underlining the constituent fields.
SELECT s.sno, s.sname
FROM   Suppliers s, Catalogue c
WHERE  s.sno = c.sno AND
       cost > (SELECT AVG (cost)
               FROM Catalogue
               WHERE pno = 'P4'
               GROUP BY pno);
The number of rows returned by the above SQL query is
Question figure
Show answer without attempting

Answer: A

Q14

GATE CS 2020 CSData ModelsMCQ1 mark−1/3 if wrong
Which one of the following is used to represent the supporting many-one relationships of a weak entity set in an entity-relationship diagram?
Show answer without attempting

Answer: A

Q36

GATE CS 2020 CSRelational DesignMCQ2 marks−2/3 if wrong
Consider a relational table RR that is in 3NF, but not in BCNF. Which one of the following statements is TRUE?
Show answer without attempting

Answer: A

Q37

GATE CS 2020 CSTransactionsMCQ2 marks−2/3 if wrong
Consider a schedule of transactions T1T_1 and T2T_2 (shown in the figure).

Here, RX stands for “Read(X)” and WX stands for “Write(X)”. Which one of the following schedules is conflict equivalent to the above schedule?
Question figure
Show answer without attempting

Answer: A

Q54

GATE CS 2020 CSStorage and IndexingNAT2 marks
Consider a database implemented using B+ tree for file indexing and installed on a disk drive with block size of 4 KB. The size of search key is 12 bytes and the size of tree/disk pointer is 8 bytes. Assume that the database has one million records. Also assume that no node of the B+ tree and no records are present initially in main memory. Consider that each record fits into one disk block. The minimum number of disk accesses required to retrieve any record in the database is __________.
Show answer without attempting

Answer: 4

0/50 correct0 marks

Related topics in GATE CS