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 PYQ2003DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider three data items D1,D2,D1, D2, and D3,D3, and the following execution schedule of transactions T1,T2,T1, T2, and T3.T3. In the diagram, R(D)R(D) and W(D)W(D) denote the actions reading and writing the data item DD respectively. …
Official PYQ2003DatabasesTuple Calculus and SQLMCQ · 1 mark
Consider the set of relations shown below and the SQL query that follows. Students: (Roll_number, Name, Date_of_birth) Courses: (Course_number, Course_name, Instructor) Grades: (Roll_number, Course_number, Grade) Select distinct Name from Students, Courses, Grades where Students.Roll_number=Grades.Roll_number and Courses.Instructor = 'Korth' and …
Official PYQ2003DatabasesNormal FormsMCQ · 1 mark
Consider the following functional dependencies in a database. …
Official PYQ2003DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
Consider the following 2−3−42-3-4 tree (i.e., B-tree with a minimum degree of two) in which each data item is a letter. The usual alphabetical ordering of letters is used in constructing the tree. What is the result of inserting GG in the above tree?
Official PYQ2003DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Consider the following SQL query Select distinct a1,a2,…,ana_1, a_2, …, a_n from r1,r2,…,rmr_1, r_2, …, r_m where P For an arbitrary predicate P, this query is equivalent to which of the following relational algebra expressions?
Official PYQ2003DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Which of the following scenarios may lead to an irrecoverable error in a database system?
Official PYQ2002DatabasesNormal FormsMCQ · 1 mark
From the following instance of a relation schema R(A,B,C)R(A,B,C), we can conclude that: ABC111110232232\begin{array}{|l|l|}\hline \textbf{A} & \textbf{B} & \textbf{C} \\ \hline \text{1} & \text{1} & \text{1} \\ \text{1} & \text{1} & \text{0} \\ \text{2} & \text{3} & \text{2} \\ \text{2} & \text{3} & \text{2} \\ \hline \end{array}
Official PYQ2002DatabasesNormal FormsMCQ · 1 mark
Relation RR is decomposed using a set of functional dependencies, FF, and relation SS is decomposed using another set of functional dependencies, GG. One decomposition is definitely BCNF\text{BCNF}, the other is definitely 3NF3NF, but it is not known which is which. To make a guaranteed identification, which one of the following tests should be …
Official PYQ2002DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
A B+B^+ - tree index is to be built on the Name attribute of the relation STUDENT. Assume that all the student names are of length 88 bytes, disk blocks are of size 512512 bytes, and index pointers are of size 44 bytes. Given the scenario, what would be the best choice of the degree (i.e. number of pointers per node) of the B+B^+ - tree?
Official PYQ2002DatabasesTuple Calculus and SQLMCQ · 1 mark
With regards to the expressive power of the formal relational query languages, which of the following statements is true?
Official PYQ2002DatabasesNormal FormsMCQ · 1 mark
Relation RR with an associated set of functional dependencies, FF, is decomposed into BCNF\text{BCNF}. The redundancy (arising out of functional dependencies) in the resulting set of relations is
Official PYQ2001DatabasesTuple Calculus and SQLMCQ · 1 mark
Consider a relation geq which represents "greater than or equal to", that is, (x,y)∈(x,y) \in geq only if y≥xy \geq x. create table geq ( ib integer not null, ub integer not null, primary key ib, foreign key (ub) references geq on delete cascade ); Which of the following is possible if tuple (x,y) is deleted?
Official PYQ2001DatabasesTuple Calculus and SQLMCQ · 1 mark
Which of the following relational calculus expression is not safe?
Official PYQ2001DatabasesNormal FormsMCQ · 1 mark
R(A,B,C,D)R(A,B,C,D) is a relation. Which of the following does not have a lossless join, dependency preserving BCNFBCNF decomposition?
Official PYQ2001DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Let r and s be two relations over the relation schemes R and S respectively, and let A be an attribute in R. The relational algebra expression σA=a(r⋈s)\sigma_{A=a}(r \bowtie s) is always equal to
Official PYQ2001DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Suppose the adjacency relation of vertices in a graph is represented in a table Adj (X,Y).(X,Y). Which of the following queries cannot be expressed by a relational algebra expression of constant length?
Official PYQ2000DatabasesTuple Calculus and SQLMCQ · 1 mark
In SQL, relations can contain null values, and comparisons with null values are treated as unknown. Suppose all comparisons with a null value are treated as false. Which of the following pairs is not equivalent?
Official PYQ2000DatabasesTuple Calculus and SQLMCQ · 1 mark
Given relations r(w, x) and s(y, z) the result of select distinct w, x from r, s is guaranteed to be same as r, provided.
Official PYQ2000DatabasesNormal FormsMCQ · 1 mark
Given the following relation instance. XYZ142153163322\begin{array}{|l|l|}\hline \text{X} & \text{Y} & \text{Z} \\ \hline \text{1} & \text{4} & \text{2} \\ \text{1} & \text{5} & \text{3} \\ \text{1} & \text{6} & \text{3} \\ \text{3} & \text{2} & \text{2} \\ \hline \end{array} Which of the following functional dependencies are …
Official PYQ2000DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Given the relations employee (name, salary, dept-no), and department (dept-no, dept-name,address), Which of the following queries cannot be expressed using the basic relational algebra operations (σ,π,×,⋈,∪,∩,−)\left(\sigma, \pi,\times ,\Join, \cup, \cap,-\right)?