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 PYQ2018DatabasesTuple Calculus and SQLMCQ · 1 mark
Consider the following two tables and four queries in SQL. Book (isbn, bname), Stock(isbn, copies) Query 1: SELECT B.isbn, S.copies FROM Book B INNER JOIN Stock S ON B.isbn=S.isbn; Query 2: SELECT B.isbn, S.copies FROM Book B LEFT OUTER JOIN Stock S ON B.isbn=S.isbn; Query 3: SELECT B.isbn, S,copies FROM Book B RIGHT OUTER JOIN Stock S ON B.isbn=S.isbn Query …
Official PYQ2017DatabasesRelational Model: Relational AlgebraNAT · 1 mark
Consider a database that has the relation schema CR(StudentName, CourseName). An instance of the schema CR is as given below. …
Official PYQ2017DatabasesTransactions and Concurrency ControlMCQ · 1 mark
In a database system, unique timestamps are assigned to each transaction using Lamport's logical clock. Let TS(T1)TS(T_{1}) and TS(T2)TS(T_{2}) be the timestamps of transactions T1T_{1} and T2T_{2} respectively. Besides, T1T_{1} holds a lock on the resource R,R, and T2T_{2} has requested a conflicting lock on the same resource R.R. The following …
Official PYQ2017DatabasesTuple Calculus and SQLMCQ · 1 mark
Consider a database that has the relation schemas EMP(EmpId, EmpName, DeptId), and DEPT(DeptName, DeptId). Note that the DeptId can be permitted to be NULL in the relation EMP. Consider the following queries on the database expressed in tuple relational calculus. {tt | ∃\existsu ∈\in EMP(t[EmpName] = u[EmpName] ∧\wedge ∀\forallv ∈\in …
Official PYQ2017DatabasesTuple Calculus and SQLNAT · 1 mark
Consider a database that has the relation schema EMP (EmpId, EmpName, and DeptName). An instance of the schema EMP and a SQL query on it are given below: …
Official PYQ2017DatabasesNormal FormsMCQ · 1 mark
The following functional dependencies hold true for the relational schema R{V,W,X,Y,Z}R\left \{V,W,X,Y,Z \right \}: V→WV \rightarrow W VW→XVW \rightarrow X Y→VXY \rightarrow VX Y→ZY \rightarrow Z Which of the following is irreducible equivalent for this set of functional dependencies?
Official PYQ2017DatabasesTransactions and Concurrency ControlNAT · 1 mark
Two transactions T1T_1 and T2T_2 are given as T1:r1(X)w1(X)r1(Y)w1(Y)T_1:r_1(X)w_1(X)r_1(Y)w_1(Y) T2:r2(Y)w2(Y)r2(Z)w2(Z)T_2:r_2(Y)w_2(Y)r_2(Z)w_2(Z) where ri(V)r_i(V) denotes a read\textit{read} operation by transaction TiT_i on a variable VV and wi(V)w_i(V) denotes a write\textit{write} operation by transaction TiT_i on a variable VV. The total number of conflict serializable …
Official PYQ2017DatabasesFile Organization and Indexing (B and B+ Trees)NAT · 1 mark
In a B+B^+ Tree , if the search-key value is 88 bytes long , the block size is 512512 bytes and the pointer size is 2  B2\;\text{B} , then the maximum order of the B+B^+ Tree is ____
Official PYQ2017DatabasesTuple Calculus and SQLNAT · 1 mark
Consider the following database table named top_scorer\text{top\_scorer}. …
Official PYQ2017DatabasesIntegrity ConstraintsNAT · 1 mark
Consider the following tables T1T1 and T2.T2. …
Official PYQ2017DatabasesER-modelMCQ · 1 mark
An ER model of a database consists of entity types AA and BB. These are connected by a relationship RR which does not have its own attribute. Under which one of the following conditions, can the relational table for R be merged with that of A?
Official PYQ2016DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the following two phase locking protocol. Suppose a transaction TT accesses (for read or write operations), a certain set of objects {O1,…,Ok}\{O_1,\ldots,O_k \}. This is done in the following manner: Step 1\text{Step 1}. TT acquires exclusive locks to O1,…,OkO_1,\ldots,O_k in increasing order of their addresses. Step 2\text{Step 2}. The required …
Official PYQ2016DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Which one of the following is NOT a part of the ACID properties of database transactions?
Official PYQ2016DatabasesNormal FormsMCQ · 1 mark
Which of the following is NOT a superkey in a relational schema with attributes V,W,X,Y,ZV,W,X,Y,Z and primary key V  YV\;Y?
Official PYQ2016DatabasesTuple Calculus and SQLNAT · 1 mark
Consider the following database table named water_schemes: …
Official PYQ2016DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the following database schedule with two transactions T1T_{1} and T2T_{2}. S=r2(X);r1(X);r2(Y);w1(X);r1(Y);w2(X);a1;a2S= r_{2}\left(X\right); r_{1}\left(X\right); r_{2} \left(Y\right); w_{1} \left(X\right); r_{1} \left(Y\right); w_{2} \left(X\right); a_{1}; a_{2} Where ri(Z)r_{i} (Z) denotes a read operation by transaction TiT_{i} on a variable ZZ, wi(Z)w_{i}(Z) denotes a write …
Official PYQ2016DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
B+ Trees are considered BALANCED because.
Official PYQ2016DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Suppose a database schedule SS involves transactions T1,…,TnT_1,\ldots,T_n . Construct the precedence graph of SS with vertices representing the transactions and edges representing the conflicts. If SS is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
Official PYQ2015DatabasesER-modelNAT · 1 mark
Consider an Entity-Relationship (ER)(\text{ER}) model in which entity sets E1E_{1} and E2E_{2} are connected by an m:nm:n relationship R12R_{12}. E1E_{1} and E3E_{3} are connected by a 1:n1 : n (11 on the side of E1E_{1} and nn on the side of E3E_{3}) relationship R13R_{13}. E1E_{1} has two-singled attributes a11a_{11} and a12a_{12} …
Official PYQ2015DatabasesTuple Calculus and SQLNAT · 1 mark
Consider the following relation: …