Time Left - 10:00 mins

ISRO CS Quiz 8 : Database

Attempt now to get your rank among 755 students!

Question 1

A relational schema for a train reservation database is given below
Passenger (pid, pname, age)
Reservation (pid, cass, tid)
Table : Passenger

Table: Reservation

What pids are returned by the following SQL query for the above instance of the tables?
SELECT pid
FROM Reservation
WHERE class = 'AC' AND
EXISTS (SELECT *
FROM Passenger
WHERE age > 65 AND
Passenger . pid = Reservation.pid)

Question 2

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 only 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 

Question 3

Consider the following schedule for transactions T1, T2 and T3:

Which one of the schedules below is the correct serialization of the above?

Question 4

Consider two transactions T1 and T2, and four schedules S1, S2, S3, S4 of T1 and T2 as given below:

Which of the above schedules are conflict-serializable?

Question 5

Let r and s be two relations over the relation schemes R and S respectively, and let A be an attribute in R. then the Relational Algebra expression σA=a(r⋈s) is always equal to

Question 6

An index is clustered, if
  • 755 attempts
  • 5 upvotes
  • 40 comments
Mar 30GATE & PSU CS