Databases questions

Q15

GATE CS 2025 CS-1TransactionsMCQ1 mark−1/3 if wrong
A schedule of three database transactions T1T_1, T2T_2, and T3T_3 is shown. Ri(A)R_i(A) and Wi(A)W_i(A) denote read and write of data item AA by transaction TiT_i, i=1,2,3i = 1,2,3. The transaction T1T_1 aborts at the end. Which other transaction(s) will be required to be rolled back?
R1(X)  W1(Y)  R2(X)  R2(Y)  R3(Y)  ABORT(T1)R_1(X) \; W_1(Y) \; R_2(X) \; R_2(Y) \; R_3(Y) \; ABORT(T_1)
Show answer without attempting

Answer: C

Q21

GATE CS 2025 CS-1Storage and IndexingMSQ1 mark
Consider the following B+B^+ tree with 5 nodes, in which a node can store at most 3 key values. The value 23 is now inserted in the B+B^+ tree. Which of the following options(s) is/are CORRECT?
Question figure
More than one option can be correct.
Show answer without attempting

Answer: B, D

Q39

GATE CS 2025 CS-1Relational QueriesMCQ2 marks−2/3 if wrong
Consider two relations describing teamsteams and playersplayers in a sports league:
- teams(tid,tname)teams(tid, tname): tid,tnametid, tname are team-id and team-name, respectively
- players(pid,pname,tid)players(pid, pname, tid): pid,pnamepid, pname, and tidtid denote player-id, player-name and the team-id of the player, respectively
Which ONE of the following tuple relational calculus queries returns the name of the players who play for the team having tnametname as ′MI′'MI'?
Show answer without attempting

Answer: A

Q47

GATE CS 2025 CS-1Relational DesignMSQ2 marks
Consider a relational schema team(name,city,owner)team(name, city, owner), with functional dependencies {name→city,name→owner}\{name \rightarrow city, name \rightarrow owner\}.
The relation teamteam is decomposed into two relations, t1(name,city)t1(name, city) and t2(name,owner)t2(name, owner). Which of the following statement(s) is/are TRUE?
More than one option can be correct.
Show answer without attempting

Answer: B, C

Q55

GATE CS 2025 CS-1Relational QueriesNAT2 marks
Consider the following database tables of a sports league.
player(pid,pname,age)
coach(cid,cname)
team(tid,tname,city,cid)
members(pid,tid)
An instance of the table and an SQL query are given.
SELECT MIN(P.age)
FROM player P
WHERE P.pid IN (
 SELECT M.pid
 FROM team T, coach C, members M
 WHERE C.cname = 'Mark'
 AND T.cid = C.cid
 AND M.tid = T.tid
 )
The value returned by the given SQL query is ______ . (Answer in integer)
Question figure
Show answer without attempting

Answer: 26

Q27

GATE CS 2025 CS-2TransactionsMSQ1 mark
An audit of a banking transactions system has found that on an earlier occasion, two joint holders of account AA attempted simultaneous transfers of Rs. 10000 each from account AA to account BB. Both transactions read the same value, Rs. 11000, as the initial balance in AA and were allowed to go through. BB was credited Rs. 10000 twice. AA was debited only once and ended up with a balance of Rs. 1000.

Which of the following properties is/are certain to have been violated by the system?
More than one option can be correct.
Show answer without attempting

Answer: B, C

Q46

GATE CS 2025 CS-2Relational DesignMSQ2 marks
Consider the following relational schema along with all the functional dependencies that hold on them.

R1(A,B,C,D,E):{D→E,EA→B,EB→C}R1(A, B, C, D, E): \{D \rightarrow E, EA \rightarrow B, EB \rightarrow C\}
R2(A,B,C,D):{A→D,A→B,C→A}R2(A, B, C, D): \{A \rightarrow D, A \rightarrow B, C \rightarrow A\}

Which of the following statement(s) is/are TRUE?
More than one option can be correct.
Show answer without attempting

Answer: C, D

Q53

GATE CS 2025 CS-2TransactionsMSQ2 marks
Consider the database transactions T1 and T2, and data items X and Y. Which of the schedule(s) is/are conflict serializable?

Transaction T1: R1(X), W1(Y), R1(X), W1(X), COMMIT(T1)
Transaction T2: W2(X), W2(Y), COMMIT(T2)
More than one option can be correct.
Show answer without attempting

Answer: B

Q54

GATE CS 2025 CS-2Relational QueriesMSQ2 marks
Consider the following relational schema:

Students (rollno: integer‾\underline{\text{rollno: integer}}, name: string, age: integer, cgpa: real)
Courses (courseno: integer‾\underline{\text{courseno: integer}}, cname: string, credits: integer)
Enrolled (rollno: integer‾\underline{\text{rollno: integer}}, courseno: integer‾\underline{\text{courseno: integer}}, grade: string)

Which of the following options is/are correct SQL query/queries to retrieve the names of the students enrolled in course number (i.e., courseno) 1470?
More than one option can be correct.
Show answer without attempting

Answer: A, C, D

Q57

GATE CS 2025 CS-2Storage and IndexingNAT2 marks
In a B+B^+- tree where each node can hold at most four key values, a root to leaf path consists of the following nodes:

A = (49, 77, 83, -), B = (7, 19, 33, 44), C = (20∗,22∗,25∗,26∗20^*, 22^*, 25^*, 26^*)

The *-marked keys signify that these are data entries in a leaf.

Assume that a pointer between keys k1k_1 and k2k_2 points to a subtree containing keys in [k1,k2)[k_1, k_2), and that when a leaf is created, the smallest key in it is copied up into its parent.

A record with key value 23 is inserted into the B+B^+- tree.

The smallest key value in the parent of the leaf that contains 25∗25^* is __________ . (Answer in integer)
Show answer without attempting

Answer: 33

0/100 correct0 marks

Related topics in GATE CS