DBMS |Gate-2011| Previous Year Questions| Set-10

Set-15 GATE-2006 DBMS

DBMS |Gate-2011| Database Management System

1. Consider a relational table with a single record for each registered student with the following attributes. [GATE – 2011]

1. Registration_Num: Unique registration number
   of each registered student
2. UID: Unique identity number, unique at the
   national level for each citizen
3. BankAccount_Num: Unique account number at
   the bank. A student can have multiple accounts
   or join accounts. This attribute stores the
   primary account number.
4. Name: Name of the student
5. Hostel_Room: Room number of the hostel

Which one of the following option is INCORRECT?

a. BankAccount_Num is a candidate key
b. Registration_Num can be a primary key
c. UID is a candidate key if all students are from the same country
d. If S is a superkey such that S∩UID is NULL then S∪UID is also a superkey

Answer : a)

2. Consider a relational table r with sufficient number of records, having attributes A1, A2,…, An and let 1 <= p <= n. Two queries Q1 and Q2 are given below.

 The database can be configured to do ordered indexing on Ap or hashing on Ap. Which of the following statements is TRUE?     [GATE – 2011]

a. Ordered indexing will always outperform hashing for both queries
b. Hashing will always outperform ordered indexing for both queries
c. Hashing will outperform ordered indexing on Q1, but not on Q2
d. Hashing will outperform ordered indexing on Q2, but not on Q1.

Answer : c)

3. Database table by name Loan_Records is given below.

Borrower    Bank_Manager   Loan_Amount
Ramesh      Sunderajan     10000.00
Suresh      Ramgopal       5000.00
Mahesh      Sunderajan     7000.00

What is the output of the following SQL query? [GATE – 2011]

SELECT Count(*)
FROM  ( ( SELECT Borrower, Bank_Manager
          FROM Loan_Records) AS S
          NATURAL JOIN ( SELECT Bank_Manager, Loan_Amount
                         FROM Loan_Records) AS T );

a. 3
b. 9
c. 6
d. 5

Answer : d)

4. Consider a database table T containing two columns X and Y each of type integer. After the creation of the table, one record (X=1, Y=1) is inserted in the table. Let MX and My denote the respective maximum values of X and Y among all records in the table at any point in time. Using MX and MY, new records are inserted in the table 128 times with X and Y values being MX+1, 2*MY+1 respectively. It may be noted that each time after the insertion, values of MX and MY change. What will be the output of the following SQL query after the steps mentioned above are carried out? [GATE – 2011]


a. 126
b. 127
c. 255
d. 257

Answer : b)
DBMS |Gate-2011|


Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *