Databases questions — page 1 of 6

Q30

GATE CS 2026 CS-1Relational DesignMSQ1 mark
Let P,Q,RP, Q, R and SS be the attributes of a relation in a relational schema. Let X⟶YX \longrightarrow Y indicate functional dependency in the context of a relational database, where X,Y⊆{P,Q,R,S}X, Y \subseteq \{P, Q, R, S\}.

Which of the following options is/are always true?
More than one option can be correct.
Show answer without attempting

Answer: C, D

Q31

GATE CS 2026 CS-1Relational DesignMSQ1 mark
In the context of relational database normalization, which of the following statements is/are true?
More than one option can be correct.
Show answer without attempting

Answer: A, B, C

Q43

GATE CS 2026 CS-1Relational QueriesMCQ2 marks−2/3 if wrong
Consider a relational database schema with two relations R(P,Q)R(P, Q) and S(X,Y)S(X, Y).

Let E={⟨u⟩∣∃v∃w⟨u,v⟩∈R∧⟨v,w⟩∈S}E = \{\langle u \rangle \mid \exists v \exists w \langle u, v \rangle \in R \land \langle v, w \rangle \in S\} be a tuple relational calculus expression.

Which one of the following relational algebraic expressions is equivalent to EE?
Show answer without attempting

Answer: B

Q65

GATE CS 2026 CS-1Relational DesignNAT2 marks
Consider a relational database schema with a relation R(A,B,C,D)R(A, B, C, D). If {A,B}\{A, B\} and {A,C}\{A, C\} are the only two candidate keys of the relation RR, then the number of superkeys of relation RR is ______. (answer in integer)
Show answer without attempting

Answer: 6

Q15

GATE CS 2026 CS-2Data ModelsMCQ1 mark−1/3 if wrong
In the context of DBMS, consider the two sets T and S given below.

| T | S |
|---|---|
| I: Logical schema | L: Views |
| II: Physical schema | M: File organization and indexes |
| III: External schema | N: Relations |

Which one of the following is the correct match from T to S ?
Show answer without attempting

Answer: C

Q20

GATE CS 2026 CS-2TransactionsMCQ1 mark−1/3 if wrong
Consider concurrent execution of two transactions T1T1 and T2T2 in a DBMS, both of which access a data object AA. For these two transactions to not conflict on AA, which one of the following statements must be true?
Show answer without attempting

Answer: A

Q42

GATE CS 2026 CS-2Relational DesignMCQ2 marks−2/3 if wrong
In the context of schema normalization in relational DBMS, consider a set F of functional dependencies. The set of all functional dependencies implied by F is called the closure of F. To compute the closure of F, Armstrong’s Axioms can be applied. Consider XX, YY, and ZZ as sets of attributes over a relational schema. The three rules of Armstrong’s Axioms are described as follows.

Reflexivity: If Y⊆XY \subseteq X, then X→YX \rightarrow Y

Augmentation: If X→YX \rightarrow Y, then XZ→YZXZ \rightarrow YZ for any Z

Transitivity: If X→YX \rightarrow Y and Y→ZY \rightarrow Z, then X→ZX \rightarrow Z

The additional rule of Union is defined as follows.

Union: If X→YX \rightarrow Y and X→ZX \rightarrow Z, then X→YZX \rightarrow YZ

It can be proved that the additional rule of Union is also implied by the three rules of Armstrong’s Axioms. Listed below are four combinations of these three rules. Which one of these combinations is both necessary and sufficient for the proof ?
Show answer without attempting

Answer: D

Q46

GATE CS 2026 CS-2Storage and IndexingMCQ2 marks−2/3 if wrong
An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the following two statements.

S1: A hash index must be a dense index

S2: A B+B^+ tree index can be a sparse index

Which one of the following options is correct?
Show answer without attempting

Answer: A

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

Q20

GATE CS 2024 CS-1Data ModelsMCQ1 mark−1/3 if wrong
Let S be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students." Which one of the following ER diagrams CORRECTLY represents S?
Show answer without attempting

Answer: D

Q21

GATE CS 2024 CS-1Storage and IndexingMCQ1 mark−1/3 if wrong
In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?
Show answer without attempting

Answer: A

0/200 correct0 marks

Related topics in GATE CS