DBMS |Gate-2012| Previous Year Questions| Set-9

Set-15 GATE-2006 DBMS

DBMS |Gate-2012| Database Management System

1. Which of the following is TRUE? [GATE – 2012]

a. Every relation in 3NF is also in BCNF
b. A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of R
c. Every relation in BCNF is also in 3NF
d. No relation can be in both BCNF and 3NF

Answer : c)


2. Given the basic ER and relational models, which of the following is INCORRECT? [GATE – 2012]

a. In a row of a relational table, an attribute can have more than one value
b. An attribute of an entity can be composite
c. An attribute of an entity can have more than one value
d. In a row of a relational table, an attribute can have exactly one value or a NULL value

Answer : a)


3. which of the  following statements are TRUE about an SQL query? P:An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause Q:An SQL query can contain a HAVING clause even if it has a GROUP BY clause R: All attributes used in the GROUP BY clause must appear in the SELECT clause S: Not all attributes used in the GROUP BY clause need to appear in the SELECT clause : [GATE – 2012]

a. P and R
b. Q and R
c. Q and S
d. P and S

Answer : b)


4. Consider the following transactions with data items P and Q initialized to zero:

T1: read (P) ;
    read (Q) ;
    if P = 0 then Q : = Q + 1 ;
    write (Q) ;
T2: read (Q) ;
    read (P) ;
    if Q = 0 then P : = P + 1
    write (P) ;

Any non-serial interleaving of T1 and T2 for concurrent execution leads to [GATE – 2012]

a. a serializable schedule
b. a conflict serializable schedule
c. a schedule for which a precedence graph cannot be drawn
d. a schedule that is not conflict serializable

Answer : d)


5. Suppose R1(A, B) and R2(C, D) are two relation schemas. Let r1 and r2 be the corresponding relation instances. B is a foreign key that refers to C in R2. If data in r1 and r2 satisfy referential integrity constraints, which of the following is ALWAYS TRUE? [GATE – 2012]

a. ∏B (r1) – ∏C (r2) = ∅
b. ∏C (r2) – ∏B (r1) = ∅
c. ∏B (r1) = ∏C (r2)
d. ∏B (r1) – ∏C (r2) ≠ ∅

Answer : a)


6. Consider the following relations A,B and C : [GATE – 2012]

a. 4
b. 5
c. 7
d. 9

Answer : c)


7. Consider the above tables A, B and C. How many tuples does the result of the following SQL query contains? [GATE – 2012]

                                                                                                                          

IdNameAge
12Arun60
15Shreya24
99Rohit11
A
IdNameAge
 15Shreya24
25Hari40
98Rohit20
99Rohit11
B
IdName Area
10220002
99210001
C


SELECT A.id
FROM   A
WHERE  A.age > ALL (SELECT B.age
                    FROM   B
                    WHERE  B. name = “arun”)

a. 4
b. 3
c. 0
d. 1

Answer : b)
DBMS |Gate-2012|


Back to GATE-HOME


Spread the love

Leave a Comment

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