GATE CSE & IT
2,749 questions · 40 years · 20 subjects
Public preview: use this branch page to find high-signal topics and keyed questions. Explanations are being added selectively, starting with recent and recurring concepts.
Worked PYQ examples
Open a few full study-layer explanations before signing in.
A short MSQ where the real trap is subspace closure, not calculation.
Shows how to convert graph wording into a reliable solve path.
Separates a common false intuition from the actual invariant.
Good example of wrong-option autopsy for algorithm statements.
Tests whether the standard theorem is being applied precisely.
Subjects
By Year
High-yield topics
All trends →Practice CSE & IT PYQs
80 questions shown in Database Management System. Filter for cleaner practice sessions.
Let $P, Q, R$ and $S$ be the attributes of a relation in a relational schema. Let $X \rightarrow Y$ indicate functional dependency in the context of a relational database, where $X...
In the context of relational database normalization, which of the following statements is/ are true?
$$ \text { In the context of DBMS, consider the two sets } \mathbf{T} \text { and } \mathbf{S} \text { given below. } $$ $$ \begin{array}{ll}\,\,\,\,\, \text { T } &\,\,\,\,\, \tex...
Consider concurrent execution of two transactions $T 1$ and $T 2$ in a DBMS, both of which access a data object $A$. For these two transactions to not conflict on $A$, which one of...
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 closur...
An index in a DBMS is said to be dense if an index entry appears for every searchkey value in the indexed file. Otherwise it is called a sparse index. Consider the following two st...
Consider a relational database schema with two relations $R(P, Q)$ and $S(X, Y)$. Let $E=\{\langle u\rangle \mid \exists v \exists w\langle u, v\rangle \in R \wedge\langle v, w\ran...
Consider a relational database schema with a relation $R(A, B, C, D)$. If $\{A, B\}$ and $\{A, C\}$ are the only two candidate keys of the relation $R$, then the number of superkey...
Consider a relational schema team(name, city, owner), with functional dependencies \{name $\rightarrow$ city, name $\rightarrow$ owner}. The relation team is decomposed into two re...
Consider two relations describing teams and players in a sports league: $\bullet$ teams(tid, tname): tid, tname are team-id and team-name, respectively. $\bullet$ players(pid, pnam...
A schedule of three database transactions $T_1, T_2$, and $T_3$ is shown. $R_i(A)$ and $W_i(A)$ denote read and write of data item $A$ by transaction $T_i, i=1,2,3$. The transactio...
Consider the following relational schema along with all the functional dependencies that hold on them. $$\begin{aligned} & R 1(A, B, C, D, E):\{D \rightarrow E, E A \rightarrow B,...
An audit of a banking transactions system has found that on an earlier occasion, two joint holders of account $A$ attempted simultaneous transfers of Rs. 10000 each from account $A...
In a $\mathrm{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=\left(20^*, 2...
Consider the following relational schema: Students ($$\mathrm{\underline {rollno:integer}}$$, name: string, age: integer, cgpa: real) Courses ($$\mathrm{\underline {courseno:intege...
In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?
Which of the following statements about a relation $R$ in first normal form (1NF) is/are TRUE?
Consider the following two relations, R(A, B) and S(A, C) : R A B 10 20 20 30 30 40 30 50 50 95 S A C 10 90 30 45 40 80 The total number of tuples obtained by evaluating the follow...
The symbol → indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?
Consider the following read-write schedule $S$ over three transactions $T_{1}$, $T_{2}$, and $T_{3}$, where the subscripts in the schedule indicate transaction IDs: $S: r_{1}(z); w...
Once the DBMS informs the user that a transaction has been successfully completed, its effect should persist even if the system crashes before all its changes are reflected on disk...
In the context of owner and weak entity sets in the ER (Entity-Relationship) data model, which one of the following statements is TRUE?
Which of the following file organizations is/are I/O efficient for the scan operation in DBMS?
Which of the following statements about the Two Phase Locking (2PL) protocol is/are TRUE?
The relation schema, Person ($\underline{\text{pid}}$, $city$), describes the city of residence for every person uniquely identified by $pid$. The following relational algebra oper...
A functional dependency $F: X \to Y$ is termed as a useful functional dependency if and only if it satisfies all the following three conditions: $X$ is not the empty set. $Y$ is no...
Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?
Consider the following table named Student in a relational database. The primary key of this table is rollNum. Student rollNum name gender marks 1 Naman M 62 2 Aliya F 70 3 Aliya F...
In a relational data model, which one of the following statements is TRUE?
Consider the following three relations in a relational database. Employee ( $$\underline {eld} $$ , Name), Brand ( $$\underline {bld} $$ , bName), Own ( $$\underline {eld} $$ , $$\...
Consider a relation R(A, B, C, D, E) with the following three functional dependencies. AB $$\to$$ C ; BC $$\to$$ D ; C $$\to$$ E; The number of superkeys in the relation R is _____...
Let R i (z) and W i (z) denote read and write operations on a data element z by a transaction T i , respectively. Consider the schedule S with four transactions. S : R 4 (x), R 2 (...
Consider two files systems A and B, that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in A and also in B. Now, conside...
Consider a linear list based implementation in a file system. Each directory is a list of nodes, where each node contains the file name along with the file metadata, such as the li...
A relation r(A, B) in a relational database has 1200 tuples. The attribute A has integer values ranging from 6 to 20, and the attribute B has integer values ranging from 1 to 20. A...
Consider the relation R(P, Q, S, T, X, Y, Z, W) with the following functional dependencies. PQ → X; P → YX; Q → Y; Y → ZW Consider the decomposition of the relation R into the cons...
The relation scheme given below is used to store information about the employees of a company, where empId is the key and deptId indicates the department to which the employee is a...
Let S be the following schedule of operations of three transactions T 1 , T 2 and T 3 in a relational database system: R 2 (Y), R 1 (X), R 3 (Z), R 1 (Y), W 1 (X), R 2 (Z), W 2 (Y)...
Suppose a database system crashes again while recovering from a previous crash. Assume checkpointing is not done by the database either during the transactions or during recovery....
Let r i (z) and w i (z) denote read and write operations respectively on a data item z by a transaction T i . Consider the following two schedules. S 1 : r 1 (x) r 1 (y) r 2 (x) r...
A data file consisting of 1,50,000 student-records is stored on a hard disk with block size of 4096 bytes. The data file is sorted on the primary key RollNo. The size of a record p...
Consider the following statements S1 and S2 about the relational data model: S1: A relation scheme can have at most one foreign key. S2: A foreign key in a relation scheme R cannot...
Suppose the following functional dependencies hold on a relation U with attributes P, Q, R, S, and T : P → QR RS → T Which of the following functional dependencies can be inferred...
Consider a relational table R that is in 3NF, but not in BCNF. Which one of the following statements is TRUE?
Which one of the following is used to represent the supporting many-one relationships of a weak entity set in an entity-relationship diagram?
Consider a database implemented using B+ tree for file indexing and installed on a disk drive with block size of 4 KB. The size of search key is 12 bytes and the size of tree/disk...
Let the set of functional dependencies F = {QR → S, R → P, S → Q} hold on a relation schema X = (PQRS). X is not in BCNF. Suppose X is decomposed into two schemas Y and Z, where Y...
Which one of the following statements is NOT correct about the B + tree data structure used for creating an index of a relational database table?
Consider the following two statements about database transaction schedules: I. Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable...
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 =...
Consider the relations $$r(A, B)$$ and $$s(B, C),$$ where $$s.B$$ is a primary key and $$r.B$$ is a foreign key referencing $$s.B.$$ Consider the query $$Q:$$ $$\,\,\,\,\,\,\,\,\,$...
In an Entity-Relationship $$(ER)$$ model, suppose $$R$$ is a many-to-one relationship from entity set $$E1$$ to entity set $$E2.$$ Assume that $$E1$$ and $$E2$$ participate totally...
Consider the following database schedule with two transactions, T 1 and T 2 S = r 2 (X); r 1 (X); r 2 (Y); w 1 (X); r 1 (Y); w 2 (X); a 1 ; a 2 where r i (Z) denotes a read operati...
Consider the following two phase locking protocol. Suppose a transaction $$T$$ accesses (for read or write operations), a certain set of objects $$\left\{ {{O_1},...,{O_k}} \right\...
Consider the following database table named $$water$$_$$schemes :$$ water_schemes scheme_no district_name capacity 1 Ajmer 20 1 Bikaner 10 2 Bikaner 10 3 Bikaner 20 1 Churu 10 2 Ch...
Suppose a database schedule $$S$$ involves transactions $${T_1},\,...,\,{T_n}.$$ Construct the precedence graph of $$S$$ with vertices representing the transactions and edges repre...
A database of research articles in a journal uses the following schema. (VOLUME, NUMBER, STARTPAGE, ENDPAGE, TITLE, YEAR, PRICE) The primary key is (VOLUME, NUMBER, STARTPAGE, ENDP...
Which one of the following is NOT a part of the $$ACID$$ properties of database transactions?
B + Trees are considered BALANCED because
Which of the following is NOT a superkey in a relational schema with attributes $$V, W, X, Y, Z$$ and primary key $$V Y?$$
Consider the following relation: Student Roll_No Student_Name 1 Raj 2 Rohit 3 Raj Performance Roll_No Course Marks 1 Math 80 1 English 70 2 Math 75 3 English 80 2 Physics 65 3 Math...
Consider the relation $$X\left( {P,Q,R,S,T,U} \right)$$ with the following set of functional dependencies $$\eqalign{ & F = \left\{ \, \right. \cr & \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\...
Consider two relations $${R_1}\left( {A,B} \right)$$ with the tuples $$(1,5), (3,7)$$ and $${R_2}\left( {A,C} \right) = \left( {1,7} \right),\left( {4,9} \right).$$ Assume that $$R...
Consider the following relation $$\,\,\,\,\,\,\,\,$$ Cinema(theater, address, capacity) Which of the following options will be needed at the end of the $$SQL$$ query $$\,\,\,\,\,\,...
Consider a B + tree in which the search key is 12 bytes long, block size is 1024 bytes, record pointer is 10 bytes long and block pointer is 8 bytes long. The maximum number of key...
A file is organized so that the ordering of data records is the same as or close to the ordering of data entries in some index. Then that index is called
SELECT operation in SQL is equivalent to
Consider an Entity-Relationship (ER) model in which entity sets E 1 and E 2 are connected by an m : n relationship R 12 . E 1 and E 3 are connected by a 1 : n (1 on the side of E 1...
Consider the following transaction involving two bank accounts x and y. read (x) ; x: = x - 50; write (x); read (y); y: = y + 50; write (y) The constraint that the sum of the accou...
Consider a simple checkpointing protocol and the following set of operations in the log. (start, $$T4$$); (write, $$T4, y, 2, 3$$); (start, $$T1$$); (commit, $$T4$$); (write, $$T1,...
The maximum number of superkeys for the relation schema $$R(E, F, G, H)$$ with $$E$$ as key is ______.
Given the following statements: S1: A foreign key declaration can always be replaced by an equivalent check assertion in SQL. S2: Given the table R(a,b,c) where a and b together fo...
Given the following two statements: $$S1:$$ Every table with two single-valued attributes is in $$1NF, 2NF, 3NF$$ and $$BCNF.$$ $$S2:$$ $$AB \to C,\,\,D \to E,\,\,E \to C$$ is a mi...
Consider the transactions T1, T2, and T3 and the schedules S1 and S2 given below. T1 : r1 (X) ; r1 (Z) ; w1 (X) ; w1 (Z) T2 : r2 (X) ; r2 (Z) ; w2 (Z) T3 : r3 (X) ; r3 (X) ; w3 (Y)...
What is the optimized version of the relation algebra expression $$\pi_{A1}(\pi_{A2}(\sigma_{F1}(\sigma_{F2}(r))))$$, where $$A1, A2$$ are sets of attributes in r with $$A1 \subset...
Consider the following relational schema: employee ( empId, empName, empDept ) customer ( custId, custName, salesRepId, rating) SalesRepId is a foreign key referring to empId of th...
Consider a join (relation algebra) between relations r(R) and s(S) using the nested loop method. There are 3 buffers each of size equal to disk block size, out of which one buffer...
Given the following schema: employees(emp-id, first-name, last-name, hire-date, dept-id, salary) departments(dept-id, dept-name, manager-id, location-id) You want to display the la...
Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item x, denoted by r(x) and w(x) respectively. Which one...
Consider the relation schema $$R = \left( {E,\,F,\,G,\,H,\,I,\,J,\,K,L,\,M,\,N} \right)$$ and the set of functional dependencies $$\left\{ {\left\{ {E,F} \right\} \to \left\{ G \ri...