chapter

    Databases Pyqs for Gate Cs

    GATE CS Databases: 5 chapters, 48 previous year questions (100% of Databases), 1320 practice questions and one solved question from each chapter.

    A question from this chapter

    Question 1
    2026 Slot Set2 PYQ
    Level 3: Exam Standard
    In the context of DBMS, consider the two sets T and S given below.

    TS
    I: Logical schemaL: Views
    II: Physical schemaM: File organization and indexes
    III: External schemaN: Relations


    Which one of the following is the correct match from T to S ?
    Question 2
    2026 Slot Set1 PYQ
    Level 3: Exam Standard
    Consider a relational database schema with two relations and .

    Let be a tuple relational calculus expression.

    Which one of the following relational algebraic expressions is equivalent to ?
    Question 3
    2026 Slot Set2 PYQ
    Level 3: Exam Standard
    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 closure of F. To compute the closure of F, Armstrong’s Axioms can be applied. Consider , , and as sets of attributes over a relational schema. The three rules of Armstrong’s Axioms are described as follows.

    Reflexivity: If , then
    Augmentation: If , then for any Z
    Transitivity: If and , then

    The additional rule of Union is defined as follows.

    Union: If and , then

    It can be proved that the additional rule of Union is also implied by the three rules of Armstrong’s Axioms. Listed below are four combinations of these three rules. Which one of these combinations is both necessary and sufficient for the proof ?
    Question 4
    2026 Slot Set2 PYQ
    Level 3: Exam Standard
    An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the following two statements.

    S1: A hash index must be a dense index
    S2: A tree index can be a sparse index

    Which one of the following options is correct?
    Question 5
    2026 Slot Set2 PYQ
    Level 3: Exam Standard

    Consider concurrent execution of two transactions and in a DBMS, both of which access a data object . For these two transactions to not conflict on , which one of the following statements must be true?

    Free preview ends here

    Login to view the complete previous-year questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Databases PYQs for GATE CS

    GATE CS Databases: 5 chapters, 48 previous year questions (100% of Databases), 1320 practice questions and one solved question from each chapter.

    About Databases Previous Year Questions (PYQs)

    48 previous year questions from Databases in GATE CS, grouped by chapter with the exam year, answer key and step-by-step solution for each.

    Databases Weightage in GATE CS

    Databases accounts for 48 of 48 Databases previous year questions in our bank (100%), about 4.8 per paper across 10 papers.

    Databases Chapter Matrix

    ChapterTopicsPYQsShare of unit PYQsPractice questions
    Relational Model, Er Design and Schema ArchitectureEr Modeling, Relationships and Weak Entities, Relational Schemas, Keys and Integrity Constraints, Three-schema Database Architecture613%172
    Relational Algebra, Tuple Calculus and SqlTuple Relational Calculus and Relational Algebra Equivalence, Sql Queries, Joins and Aggregation, Relational Algebra Operations, Division and Self-joins, Selection Cardinality and Query Result Estimation1123%306
    Functional Dependencies, Keys and NormalizationFunctional Dependency Inference and Armstrong's Axioms, Candidate Keys, Closures and Superkeys, Normal Forms, Lossless Decomposition and Dependency Preservation1327%331
    File Organization, Indexing and B+ TreesB+ Tree Insertion, Splitting and Occupancy, File Organization and Scan Efficiency, Dense, Sparse, Primary and Secondary Indexes715%197
    Transactions, Concurrency Control and RecoveryAcid Properties and Concurrency Anomalies, Conflict Serializability and Schedule Equivalence, Recoverability, Cascading Rollback and Crash Recovery, Two-phase Locking and Lock-based Concurrency Control1123%314

    More from Databases

    One Solved Question from Each Databases Chapter

    Question 1 · Relational Model, ER Design and Schema Architecture · 2026_Set2 MCQ
    In the context of DBMS, consider the two sets T and S given below.

    TS
    I: Logical schemaL: Views
    II: Physical schemaM: File organization and indexes
    III: External schemaN: Relations


    Which one of the following is the correct match from T to S ?
    1. A.

      I – L, II – M, III – N

    2. B.

      I – M, II – L, III – N

    3. C.

      I – N, II – M, III – L

    4. D.

      I – N, II – L, III – M

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: Map the three-schema architecture levels to their concrete DBMS implementations: External=Views, Logical=Relations, Physical=File org/indexes.

    Exam route: Logical schema defines tables/relations (N). Physical schema defines storage/indexes (M). External schema defines user views (L). Match: I N, II M, III L. This corresponds to option C.

    Learning route:

    1. External Schema (View Level): Tailored to specific user groups, hiding the rest of the database for security and simplicity. Concrete DBMS equivalent: Views (L).
    2. Logical Schema (Conceptual Level): Describes what data is stored and the relationships among them, hiding physical details. Concrete DBMS equivalent: Relations/Tables (N).
    3. Physical Schema (Internal Level): Describes how data is actually stored on the storage medium (bytes, compression, indexing). Concrete DBMS equivalent: File organization and indexes (M).

    Matching: I (Logical) matches N (Relations). II (Physical) matches M (File organization). III (External) matches L (Views).

    Therefore, the correct match is I – N, II – M, III – L.

    Question 2 · Relational Algebra, Tuple Calculus and SQL · 2026_Set1 MCQ
    Consider a relational database schema with two relations and .

    Let be a tuple relational calculus expression.

    Which one of the following relational algebraic expressions is equivalent to ?
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: This is a TRC to Relational Algebra translation question, recognizable by the set-builder notation and existential quantifiers linking two relations.

    Exam route: Map the positional variables in the TRC tuples to the relation attributes. Identify the shared variable to find the join condition, then project the output variable.

    Learning route:

    Step 1: Analyze the schema. Relation has attributes and relation has attributes .

    Step 2: Analyze the first condition . By positional mapping, the first variable corresponds to attribute , and the second variable corresponds to attribute .

    Step 3: Analyze the second condition . By positional mapping, the first variable corresponds to attribute , and the second variable corresponds to attribute .

    Step 4: Identify the join condition. The variable is shared between both tuples. Therefore, the value of 's second attribute must equal 's first attribute: .

    Step 5: Identify the output. The expression outputs the tuple . Since corresponds to the first attribute of , we must project attribute .

    Step 6: Construct the Relational Algebra expression. We join and on and project : .

    Step 7: Match with options. Option B is . Since the theta join is commutative, this is logically equivalent to our derived expression.

    Final Answer: Option B.

    Question 3 · Functional Dependencies, Keys and Normalization · 2026_Set2 MCQ
    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 closure of F. To compute the closure of F, Armstrong’s Axioms can be applied. Consider , , and as sets of attributes over a relational schema. The three rules of Armstrong’s Axioms are described as follows.

    Reflexivity: If , then
    Augmentation: If , then for any Z
    Transitivity: If and , then

    The additional rule of Union is defined as follows.

    Union: If and , then

    It can be proved that the additional rule of Union is also implied by the three rules of Armstrong’s Axioms. Listed below are four combinations of these three rules. Which one of these combinations is both necessary and sufficient for the proof ?
    1. A.

      Reflexivity, Augmentation, and Transitivity

    2. B.

      Reflexivity and Augmentation

    3. C.

      Transitivity

    4. D.

      Augmentation and Transitivity

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: The Union rule is proved by expanding both sides (Augmentation) and then chaining the results (Transitivity). Reflexivity is never invoked.

    Exam route:

    1. Given . Augment with : , i.e., .
    2. Given . Augment with : , i.e., .
    3. From and , by Transitivity: .

    Only Augmentation and Transitivity were used. Reflexivity was not needed.

    Learning route:

    We must show that using the minimum subset of Armstrong's axioms.

    • Augmentation lets us add the same attributes to both sides: .
    • Transitivity lets us chain: and .
    • Reflexivity only generates trivial FDs () and cannot create new non-trivial dependencies.

    Since the proof above uses only steps 1 and 2, the combination "Augmentation and Transitivity" is both necessary (neither alone suffices) and sufficient.

    Wrong path: A student might think Reflexivity is always needed because it is one of the three core axioms. But Reflexivity only produces trivial FDs; it cannot help derive a non-trivial result like from and .

    Verification: Plug . Given and . Step 1 gives . Step 2 gives . Step 3 gives . Correct.

    Question 4 · File Organization, Indexing and B+ Trees · 2026_Set2 MCQ
    An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the following two statements.

    S1: A hash index must be a dense index
    S2: A tree index can be a sparse index

    Which one of the following options is correct?
    1. A.

      Both S1 and S2 are true

    2. B.

      Both S1 and S2 are false

    3. C.

      S1 is true and S2 is false

    4. D.

      S1 is false and S2 is true

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: Hash indices are unordered and require an entry for every key to locate records (dense), whereas B+ trees are ordered and can act as a sparse primary index if the file is ordered by the same key.

    Exam route: Evaluate S1: Hash index lacks order, so sparse indexing (which relies on file order) is impossible. Thus, S1 is true. Evaluate S2: A B+ tree index can be clustered (primary) and sparse, storing only the first key of each data block. Thus, S2 is true. Both are true.

    Learning route:

    1. Dense index: entry for every search key.
    2. Sparse index: entry for only some keys (e.g., one per block), strictly requires the data file to be physically sorted on the index key.
    3. S1 (Hash index): A hash function computes a bucket address directly. It does not maintain search keys in sorted order. Therefore, you cannot skip keys or point to block anchors. Every search key must have its own entry. S1 is true.
    4. S2 (B+ tree index): A B+ tree maintains keys in sorted order. If built on the ordering key of a sequentially sorted file, it acts as a primary index. It can be implemented as a sparse index where internal nodes or leaf entries point to data blocks rather than individual records. S2 is true.

    Conclusion: Both S1 and S2 are true.

    Question 5 · Transactions, Concurrency Control and Recovery · 2026_Set2 MCQ

    Consider concurrent execution of two transactions and in a DBMS, both of which access a data object . For these two transactions to not conflict on , which one of the following statements must be true?

    1. A.

      Both and only read

    2. B.

      reads and writes

    3. C.

      writes and reads

    4. D.

      Both and write

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: Conflicting operations require at least one write operation on the same data item by different transactions.

    Exam route: Eliminate any option that includes a write operation on data object A.

    Learning route:

    1. Recall the definition of conflicting operations:
    • They belong to different transactions.
    • They access the same data item.
    • At least one of the operations is a Write.
    1. The question asks for the condition where the two transactions do NOT conflict on A.
    2. To avoid conflict, the third condition must be false. Therefore, neither transaction can perform a Write on A.
    3. Both transactions must only read A.