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 PYQ2021DatabasesRelational Model: Relational AlgebraMCQ · 2 marks
The following relation records the age of 500500 employees of a company, where empNoempNo (indicating the employee number) is the key: empAge(empNo‾,age)empAge(\underline{empNo},age) Consider the following relational algebra expression: ΠempNo(empAge⋈(age>age1)ρempNo1,age1(empAge))\Pi_{empNo}(empAge \Join_{(age>age1)} \rho_{empNo1,age1}(empAge)) What does the above expression generate?
Official PYQ2021DatabasesTransactions and Concurrency ControlMCQ · 2 marks
Let ri(z)r_i(z) and wi(z)w_i(z) denote read and write operations respectively on a data item zz by a transaction TiT_i. Consider the following two schedules. 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) Which one of the following options is correct?
Official PYQ2021DatabasesNormal FormsMCQ · 2 marks
Consider the relation R(P,Q,S,T,X,Y,Z,W)R(P,Q,S,T,X,Y,Z,W) with the following functional dependencies. PQ→X;P→YX;Q→Y;Y→ZWPQ\rightarrow X;\quad P\rightarrow YX;\quad Q\rightarrow Y; \quad Y\rightarrow ZW Consider the decomposition of the relation RR into the constituent relations according to the following two decomposition schemes. …
Official PYQ2021DatabasesIntegrity ConstraintsMCQ · 1 mark
Consider the following statements S1S1 and S2S2 about the relational data model: S1S1: A relation scheme can have at most one foreign key. S2S2: A foreign key in a relation scheme RR cannot be used to refer to tuples of R.R. Which one of the following choices is correct?
Official PYQ2021DatabasesFile Organization and Indexing (B and B+ Trees)NAT · 1 mark
A data file consisting of 1,50,0001,50,000 student-records is stored on a hard disk with block size of 40964096 bytes. The data file is sorted on the primary key RollNo\textrm{RollNo}. The size of a record pointer for this disk is 77 bytes. Each student-record has a candidate key attribute called ANum\textrm{ANum} of size 1212 bytes. Suppose an index file …
Official PYQ2021DatabasesTuple Calculus and SQLMCQ · 2 marks
The relation scheme given below is used to store information about the employees of a company, where empId\textsf{empId} is the key and deptId\textsf{deptId} indicates the department to which the employee is assigned. Each employee is assigned to exactly one department. emp(empId‾, name, gender, salary, deptId)\textsf{emp($\underline{\textsf{empId}}$, name, gender, salary, deptId)} Consider the …
Official PYQ2021DatabasesTransactions and Concurrency ControlMCQ · 2 marks
​​​​​Let SS be the following schedule of operations of three transactions T1T_1, T2T_2 and T3T_3 in a relational database system: R2(Y),R1(X),R3(Z),R1(Y)W1(X),R2(Z),W2(Y),R3(X),W3(Z)R_2(Y), R_1(X), R_3(Z), R_1(Y)W_1(X), R_2(Z), W_2(Y), R_3(X), W_3(Z) Consider the statements PP and QQ below: PP: SS is conflict-serializable. QQ: If T3T_3 commits before T1T_1 finishes, then SS …
Official PYQ2021DatabasesNormal FormsMSQ · 2 marks
Suppose the following functional dependencies hold on a relation UU with attributes P,Q,R,SP,Q,R,S, and TT: P→QRP \rightarrow QR RS→TRS \rightarrow T Which of the following functional dependencies can be inferred from the above functional dependencies?
Official PYQ2020DatabasesTuple Calculus and SQLMCQ · 1 mark
Consider a relational database containing the following schemas. …
Official PYQ2020DatabasesER-modelMCQ · 1 mark
Which one of the following is used to represent the supporting many-one relationships of a weak entity set in an entity-relationship diagram?
Official PYQ2020DatabasesNormal FormsMCQ · 2 marks
Consider a relational table RR that is in 3NF3NF, but not in BCNF. Which one of the following statements is TRUE?
Official PYQ2020DatabasesFile Organization and Indexing (B and B+ Trees)NAT · 2 marks
Consider a database implemented using B+B^+ tree for file indexing and installed on a disk drive with block size of 4 KB\text{4 KB}. The size of search key is 12 bytes\text{12 bytes} and the size of tree/disk pointer is 8 bytes\text{8 bytes}. Assume that the database has one million records. Also assume that no node of the B+B^+ tree and no records are present …
Official PYQ2019DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the following two statements about database transaction schedules: Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable. Timestamp-ordering concurrency control protocol with Thomas’ Write Rule can generate view serializable schedules that are not conflict serializable Which of the above statements …
Official PYQ2019DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
Which one of the following statements is NOT correct about the B+B^+ tree data structure used for creating an index of a relational database table?
Official PYQ2019DatabasesNormal FormsMCQ · 2 marks
Let the set of functional dependencies F={QR→S, R→P, S→Q}F=\{QR \rightarrow S, \: R \rightarrow P, \: S \rightarrow Q \} hold on a relation schema X=(PQRS)X=(PQRS). XX is not in BCNF. Suppose XX is decomposed into two schemas YY and ZZ, where Y=(PR)Y=(PR) and Z=(QRS)Z=(QRS). Consider the two statements given below. Both YY and ZZ are in BCNF Decomposition of …
Official PYQ2019DatabasesTuple Calculus and SQLNAT · 2 marks
A relational database contains two tables Student and Performance as shown below: …
Official PYQ2019DatabasesRelational Model: Relational AlgebraNAT · 2 marks
Consider the following relations P(X,Y,Z),Q(X,Y,T)P(X,Y,Z), Q(X,Y,T) and R(Y,V)R(Y,V). …
Official PYQ2018DatabasesNormal FormsMCQ · 2 marks
Consider the following four relational schemas. For each schema , all non-trivial functional dependencies are listed, The bolded attributes are the respective primary keys. Schema I:\text{Schema I:} Registration(rollno, courses) Field ‘courses’ is a set-valued attribute containing the set of courses a student has registered for. Non-trivial functional dependency …
Official PYQ2018DatabasesRelational Model: Relational AlgebraMCQ · 2 marks
Consider the relations r(A,B)r(A, B) and s(B,C)s(B, C), where s.Bs.B is a primary key and r.Br.B is a foreign key referencing s.Bs.B. Consider the query Q:r⋈(σB<5(s))Q: r \bowtie (\sigma_{B<5} (s)) Let LOJ denote the natural left outer-join operation. Assume that rr and ss contain no null values. Which of the following is NOT equivalent to QQ?
Official PYQ2018DatabasesER-modelMCQ · 1 mark
In an Entity-Relationship (ER) model, suppose RR is a many-to-one relationship from entity set E1 to entity set E2. Assume that E1 and E2 participate totally in RR and that the cardinality of E1 is greater than the cardinality of E2. Which one of the following is true about RR?