Relational Queries questions

Q29

GATE CS 2015 CS-3Relational QueriesMCQ1 mark−1/3 if wrong
Consider the following relation

Cinema(theater, address, capacity)

Which of the following options will be needed at the end of the SQL query
SELECT P1.address
FROM Cinema P1
such that it always finds the addresses of theaters with maximum capacity?
Show answer without attempting

Answer: A

Q31

GATE CS 2015 CS-1Relational QueriesMCQ1 mark−1/3 if wrong
SELECT operation in SQL is equivalent to
Show answer without attempting

Answer: D

Q61

GATE CS 2015 CS-1Relational QueriesNAT2 marks
Consider the following relations:

Student
Roll_NoStudent_Name
1Raj
2Rohit
3Raj
Performance
Roll_NoCourseMarks
1Math80
1English70
2Math75
3English80
2Physics65
3Math80
Consider the following SQL query.
SELECT S.Student_Name, sum(P.Marks)
FROM Student S, Performance P
WHERE S.Roll_No = P.Roll_No
GROUP BY S.Student_Name
The number of rows that will be returned by the SQL query is ________.
Show answer without attempting

Answer: 2

Q40

GATE CS 2015 CS-2Relational QueriesMCQ2 marks−2/3 if wrong
Consider two relations R1(A,B)R_1(A,B) with the tuples (1,5), (3,7) and R2(A,C)R_2(A,C) = (1,7), (4,9). Assume that R(A,B,C) is the full natural outer join of R1R_1 and R2R_2. Consider the following tuples of the form (A,B,C): a = (1,5,null), b = (1,null,7), c = (3,null,9), d = (4,7,null), e = (1,5,7), f = (3,7,null), g = (4,null,9). Which one of the following statements is correct?
Show answer without attempting

Answer: C

0/40 correct0 marks

Related topics in Databases