Skip to content

GATE CS Databases questions

Practise Databases questions for GATE CS. Explore official PYQs and original subject-wise quizzes, check answers and view available solutions. Free, no sign-in.

Separate schema constraints from assumptions in the question. For SQL, trace joins and grouping; for normalisation, work from the stated functional dependencies.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

20 on this page
Official PYQ2010DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the following schedule for transactions T1,T2T1, T2 and T3:T3: …
Official PYQ2010DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock? 22-phase locking Time-stamp ordering
Official PYQ2010DatabasesTuple Calculus and SQLMCQ · 1 mark
A relational schema for a train reservation database is given below. passenger(pid, pname, age) reservation(pid, class, tid) …
Official PYQ2010DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
Consider a B+B^+-tree in which the maximum number of keys in a node is 55. What is the minimum number of keys in any non-root node?
Official PYQ2009DatabasesNormal FormsMCQ · 1 mark
Consider the following relational schema: Suppliers(sid:integer‾, sname:string, city:string, street:string)\text{Suppliers}(\underline{\text{sid:integer}},\text{ sname:string, city:string, street:string}) Parts(pid:integer‾, pname:string, color:string)\text{Parts}(\underline{\text{pid:integer}}, \text{ pname:string, color:string}) Catalog(sid:integer, pid:integer‾,cost:real)\text{Catalog}(\underline {\text{sid:integer, pid:integer}}, \text{cost:real}) Assume that, in the suppliers relation above, …
Official PYQ2009DatabasesTuple Calculus and SQLMCQ · 1 mark
Consider the following relational schema: Suppliers(sid:integer‾, sname:string, city:string, street:string)\text{Suppliers}(\underline{\text{sid:integer}},\text{ sname:string, city:string, street:string}) Parts(pid:integer‾, pname:string, color:string)\text{Parts}(\underline{\text{pid:integer}}, \text{ pname:string, color:string}) Catalog(sid:integer, pid:integer‾,cost:real)\text{Catalog}(\underline {\text{sid:integer, pid:integer}}, \text{cost:real}) Consider the following relational query on the …
Official PYQ2009DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider two transactions T1T_1 and T2T_2, and four schedules S1,S2,S3,S4S_1, S_2, S_3, S_4, of T1T_1 and T2T_2 as given below: T1:R1[x]W1[x]W1[y]T_1: R_1[x]W_1[x]W_1[y] T2:R2[x]R2[y]W2[y]T_2: R_2[x]R_2[y]W_2[y] S1:R1[x]R2[x]R2[y]W1[x]W1[y]W2[y]S_1: R_1[x]R_2[x]R_2[y] W_1[x] W_1[y] W_2[y] S2:R1[x]R2[x]R2[y]W1[x]W2[y]W1[y]S_2: R_1[x]R_2[x]R_2[y] W_1[x] W_2[y] W_1[y] S3:R1[x]W1[x]R2[x]W1[y]R2[y]W2[y]S_3: R_1[x]W_1[x]R_2[x] W_1[y] R_2[y] W_2[y] …
Official PYQ2009DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
The following key values are inserted into a B+B^+ - tree in which order of the internal nodes is 33, and that of the leaf nodes is 22, in the sequence given below. The order of internal nodes is the maximum number of tree pointers in each node, and the order of leaf nodes is the maximum number of data items that can be stored in it. The B+B^+ - …
Official PYQ2009DatabasesTuple Calculus and SQLMCQ · 1 mark
Let RR and SS be relational schemes such that R={a,b,c}R=\{a,b,c\} and S={c}.S=\{c\}. Now consider the following queries on the database: πR−S(r)−πR−S(πR−S(r)×s−πR−S,S(r))\pi_{R-S}(r) - \pi_{R-S} \left (\pi_{R-S} (r) \times s - \pi_{R-S,S}(r)\right ) …
Official PYQ2008DatabasesER-modelMCQ · 1 mark
Consider the following ER\text{ER} diagram The minimum number of tables needed to represent MM, NN, PP, R1R1, R2R2 is Which of the following is a correct attribute set for one of the tables for the minimum number of tables needed to represent MM, NN, PP, R1R1, R2R2?
Official PYQ2008DatabasesNormal FormsMCQ · 1 mark
Consider the following relational schemes for a library database: Book (Title, Author, Catalog_no, Publisher, Year, Price) Collection(Title, Author, Catalog_no) with the following functional dependencies: Title Author → Catalog_no\text{Title Author }\rightarrow\text{ Catalog\_no} Catalog_no → Title Author Publisher Year\text{Catalog\_no }\rightarrow\text{ Title Author Publisher Year} …
Official PYQ2008DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Let R and S be two relations with the following schema R(P,Q‾,R1,R2,R3)R(\underline{P,Q}, R1, R2, R3) S(P,Q‾,S1,S2)S(\underline{P,Q}, S1, S2) where {P,Q}\left\{P, Q\right\} is the key for both schemas. Which of the following queries are equivalent? ΠP(R⋈S)\Pi_P \left(R \bowtie S\right) ΠP(R)⋈ΠP(S)\Pi_P \left(R\right) \bowtie \Pi_P\left(S\right) …
Official PYQ2008DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
A B-tree of order 44 is built from scratch by 1010 successive insertions. What is the maximum number of node splitting operations that may take place?
Official PYQ2008DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
A clustering index is defined on the fields which are of type
Official PYQ2008DatabasesTuple Calculus and SQLMCQ · 1 mark
Which of the following tuple relational calculus expression(s) is/are equivalent to ∀t∈r(P(t))\forall t \in r \left(P\left(t\right)\right)? ¬∃t∈r(P(t))\neg \exists t \in r \left(P\left(t\right)\right) ∃t∉r(P(t))\exists t \notin r \left(P\left(t\right)\right) ¬∃t∈r(¬P(t))\neg \exists t \in r \left(\neg P\left(t\right)\right) ∃t∉r(¬P(t))\exists t \notin r \left(\neg P\left(t\right)\right)
Official PYQ2008DatabasesER-modelMCQ · 1 mark
Consider the following ER\text{ER} diagram The minimum number of tables needed to represent MM, NN, PP, R1R1, R2R2 is
Official PYQ2008DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
Consider a file of 1638416384 records. Each record is 32  bytes32\;\text{bytes} long and its key field is of size 6  bytes6\;\text{bytes}. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024  bytes1024\;\text{bytes}, and the size of a block pointer is 10  bytes10\;\text{bytes}. If the secondary …
Official PYQ2007DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Information about a collection of students is given by the relation studInfo(studId‾, name, sex)\text{studInfo(}\underline{\text{studId}},\text{ name, sex)}. The relation enroll(studId, courseId)\text{enroll(}{\text{studId}},{\text{ courseId}}) gives which student has enrolled for (or taken) what course(s). Assume that every course is taken by at least one male and at least one female student. What …
Official PYQ2007DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the following schedules involving two transactions. Which one of the following statements is TRUE? S1:r1(X);r1(Y);r2(X);r2(Y);w2(Y);w1(X)S_1 :r_1(X); r_1(Y); r_2(X); r_2(Y); w_2(Y); w_1(X) S2:r1(X);r2(X);r2(Y);w2(Y);r1(Y);w1(X)S_2 :r_1(X); r_2(X); r_2(Y); w_2(Y); r_1(Y); w_1(X)
Official PYQ2007DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
The order of a leaf node in a B+B^+ - tree is the maximum number of (value, data record pointer) pairs it can hold. Given that the block size is 1K  bytes1K\;\text{bytes}, data record pointer is 7  bytes7\;\text{bytes} long, the value field is 9  bytes9\;\text{bytes} long and a block pointer is 6  bytes6 \;\text{bytes} long, what is the order of the leaf node?