chapter

    Database Systems Pyqs for Gate Da

    GATE DA Database Systems: 4 chapters, 19 previous year questions (86% of Database Management and Warehousing), 1683 practice questions and one solved question

    A question from this chapter

    Question 1
    2026 PYQ
    Level 3: Exam Standard
    Let Account be a relation as shown.

    Account
    AccNo Balance
    A1 5000
    A2 5000
    A3 10000
    A4 15000
    A5 18000

    Consider the given SQL query.

    SELECT AccNo FROM Account AS A
    WHERE (SELECT COUNT(*) FROM Account AS B
    WHERE A.Balance < B.Balance) >= (SELECT COUNT(*)
    FROM Account AS C WHERE A.Balance > C.Balance)

    The number of rows returned by the SQL query is __________ . (Answer in integer)
    Question 2
    2026 PYQ
    Level 3: Exam Standard
    Consider an ER model with the entities and , where, are the attributes of , and are the attributes of . Let be a multi-valued attribute. and are the primary keys of and , respectively.

    Let be a many-to-many relationship between and . Participation of both and in is total.

    The minimum number of relations required to convert the ER model into relational model (assuming there is no other functional dependency) where each relation is in third normal form (3NF) is __________ . (Answer in integer)
    Question 3
    2026 PYQ
    Level 3: Exam Standard
    Let R(A,B,C,D,E) be a relational schema with functional dependency set .
    Which of the following statements is correct?
    Question 4
    2026 PYQ
    Level 3: Exam Standard
    In a relational database, a B+ Tree Index is to be constructed for a relation on a key field. In a B+ Tree, a Node Pointer points to a sub-tree and a Data Record Pointer points to a block of database records.

    Let, Node size = 4096 bytes, Node Pointer size = 10 bytes, Search Key Field size = 11 bytes and Data Record Pointer size = 12 bytes.

    The maximum number of Node Pointers that can be present in a non-leaf node of the B+ Tree is ________ . (Answer in integer)
    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.

    Database Systems PYQs for GATE DA

    GATE DA Database Systems: 4 chapters, 19 previous year questions (86% of Database Management and Warehousing), 1683 practice questions and one solved question from each chapter.

    About Database Systems Previous Year Questions (PYQs)

    19 previous year questions from Database Systems in GATE DA, grouped by chapter with the exam year, answer key and step-by-step solution for each.

    Database Systems Weightage in GATE DA

    Database Systems accounts for 19 of 22 Database Management and Warehousing previous year questions in our bank (86%), about 6.3 per paper across 3 papers.

    Database Systems Chapter Matrix

    ChapterTopicsPYQsShare of unit PYQsPractice questions
    Relational Algebra and Sql QueriesRelational Algebra Expressions and Query Semantics, Sql Joins, Aggregation and Grouping, Sql Subqueries and Query Result Evaluation947%760
    Er Model, Keys and Integrity ConstraintsEr-to-relational Mapping and Multivalued Attributes, Keys, Null Constraints and Foreign Key Integrity316%271
    Functional Dependencies and NormalizationFunctional Dependencies and Candidate Keys, Normalization, Bcnf and Dependency Preservation, Armstrong Axioms and Derived Dependencies421%378
    Indexing and B+ TreesB+ Tree Structure, Insertion and Fanout Calculation, Index Selection for Sql Query Processing316%274

    More from Database Management and Warehousing

    One Solved Question from Each Database Systems Chapter

    Question 1 · Relational Algebra and SQL Queries · 2026 NAT
    Let Account be a relation as shown.

    Account
    AccNo Balance
    A1 5000
    A2 5000
    A3 10000
    A4 15000
    A5 18000

    Consider the given SQL query.

    SELECT AccNo FROM Account AS A
    WHERE (SELECT COUNT(*) FROM Account AS B
    WHERE A.Balance < B.Balance) >= (SELECT COUNT(*)
    FROM Account AS C WHERE A.Balance > C.Balance)

    The number of rows returned by the SQL query is __________ . (Answer in integer)
    Correct Answer:

    3.00

    Step-by-Step Solution

    Insight: This is the classic median/rank pattern using correlated subqueries to count strictly greater and strictly smaller elements.

    Exam route: For each balance, count the number of strictly greater and strictly smaller balances. Keep the row if greater >= smaller.

    Learning route:

    Step 1: Recognize the pattern. The query uses correlated subqueries to count elements greater than and smaller than the current row's value. This is a standard technique for finding medians or ranks.

    Step 2: Evaluate for A1 (Balance = 5000).

    • Count of B where 5000 < B.Balance: B can be A3(10000), A4(15000), A5(18000). Count = 3.
    • Count of C where 5000 > C.Balance: None. Count = 0.
    • Condition: 3 >= 0. TRUE.

    Step 3: Evaluate for A2 (Balance = 5000).

    • Same as A1. Count greater = 3, Count smaller = 0.
    • Condition: 3 >= 0. TRUE.

    Step 4: Evaluate for A3 (Balance = 10000).

    • Count of B where 10000 < B.Balance: A4(15000), A5(18000). Count = 2.
    • Count of C where 10000 > C.Balance: A1(5000), A2(5000). Count = 2.
    • Condition: 2 >= 2. TRUE.

    Step 5: Evaluate for A4 (Balance = 15000).

    • Count of B where 15000 < B.Balance: A5(18000). Count = 1.
    • Count of C where 15000 > C.Balance: A1(5000), A2(5000), A3(10000). Count = 3.
    • Condition: 1 >= 3. FALSE.

    Step 6: Evaluate for A5 (Balance = 18000).

    • Count of B where 18000 < B.Balance: None. Count = 0.
    • Count of C where 18000 > C.Balance: A1, A2, A3, A4. Count = 4.
    • Condition: 0 >= 4. FALSE.

    Step 7: Count the TRUE rows: A1, A2, A3. Total = 3.

    Verification: The condition greater >= smaller identifies the median or lower-middle elements. For 5 elements, the median is the 3rd element (10000), and the lower-middle includes the two 5000s. Total 3 rows.

    Question 2 · ER Model, Keys and Integrity Constraints · 2026 NAT
    Consider an ER model with the entities and , where, are the attributes of , and are the attributes of . Let be a multi-valued attribute. and are the primary keys of and , respectively.

    Let be a many-to-many relationship between and . Participation of both and in is total.

    The minimum number of relations required to convert the ER model into relational model (assuming there is no other functional dependency) where each relation is in third normal form (3NF) is __________ . (Answer in integer)
    Correct Answer:

    4.00

    Step-by-Step Solution

    Insight: Multi-valued attributes require a separate relation, and M:N relationships require a separate relation to achieve 1NF and 3NF.

    Exam route: Count relations for each component. E1 -> 1 relation. E2 with multi-valued A22 -> 2 relations (one for simple attributes, one for multi-valued). M:N relationship R12 -> 1 relation. Total = 1 + 2 + 1 = 4.

    Learning route:

    To convert an ER model to a relational model in 3NF, we follow standard mapping rules:

    1. Strong Entity E1: Maps to 1 relation with PK .
    2. Strong Entity E2: Has a multi-valued attribute . To satisfy 1NF (and thus 3NF), multi-valued attributes must be separated. This creates 2 relations:
    • with PK .
    • with PK .
    1. M:N Relationship R12: Must map to a separate relation containing the primary keys of both participating entities: with PK .

    Total number of relations = 1 (E1) + 2 (E2) + 1 (R12) = 4.

    All resulting relations are in 3NF as there are no transitive dependencies.

    Question 3 · Functional Dependencies and Normalization · 2026 MCQ
    Let R(A,B,C,D,E) be a relational schema with functional dependency set .
    Which of the following statements is correct?
    1. A.

      AD, ED and CD are the only candidate keys of R.

    2. B.

      AD and ED are the only candidate keys of R.

    3. C.

      A, E and CD are the only candidate keys of R.

    4. D.

      A and CD are the only candidate keys of R.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: appears only on left-hand sides so it must sit in every candidate key, appears only on right-hand sides so it can never sit in one — then only three combinations remain to close.

    Exam route: , and all equal and each is minimal, so the keys are , , — option A.

    Learning route:

    Step 1 — the trigger. Every option ends with "the only candidate keys", so the task is exhaustive enumeration plus a minimality proof, not one convenient closure.

    Step 2 — classify by appearance in .

    : left in , right in — both sides.

    : right only — never in a candidate key. (Whenever is known, comes free from , and every key here eventually reaches , directly or through ; so deleting from a key would leave the closure intact, and a key containing could not be minimal.)

    : left in , right in — both sides.

    : left only — must be in every candidate key.

    : left in , right in — both sides.

    Step 3 — every candidate key is together with a subset of . Test the three single additions.

    : gives ; now fires and adds , giving all of . Check minimality: stops there because needs , and . Both proper subsets fail, so is a candidate key.

    : gives ; gives ; completes . Minimality: , . So is a candidate key.

    : gives ; gives all of . Minimality: — it never acquires — and . So is a candidate key.

    Any two- or three-element addition is a proper superset of one of these three, so none is minimal.

    Step 4 — the candidate keys are exactly , , . Option A.

    Second pass by back-substitution: option B claims only and , but we just computed with both proper subsets failing, so a genuine third key is missing and B is incomplete. Options C and D both include : , missing and , so is not a key at all; option C also includes , whose closure is missing . Only option A survives both checks.

    The tempting wrong path: compute , watch fill in three attributes, glance at and declare a key because "it reached almost everything". That produces option C, and its trimmed twin option D. The break is the single line where the closure is compared with : is absent, and is precisely the attribute nothing in can produce.

    Generalisation: an attribute that never appears on a right-hand side must be physically present in every key — never let a closure "almost" cover the relation.

    Verification: , and each close to all of and each loses that property when either attribute is removed; , , alone and every set containing all fail. Three keys, matching option A exactly.

    Question 4 · Indexing and B+ Trees · 2026 NAT
    In a relational database, a B+ Tree Index is to be constructed for a relation on a key field. In a B+ Tree, a Node Pointer points to a sub-tree and a Data Record Pointer points to a block of database records.

    Let, Node size = 4096 bytes, Node Pointer size = 10 bytes, Search Key Field size = 11 bytes and Data Record Pointer size = 12 bytes.

    The maximum number of Node Pointers that can be present in a non-leaf node of the B+ Tree is ________ . (Answer in integer)
    Correct Answer:

    195

    Step-by-Step Solution

    Insight: The maximum fanout of a non-leaf node is constrained by the fixed block size, ensuring all pointers and keys fit within a single node.

    Exam route: Use the non-leaf fanout inequality: . Substitute , , , and solve for integer .

    Learning route:

    1. Identify node components: A non-leaf node contains node pointers and search keys. Data record pointers are only present in leaf nodes.
    2. Set up the size inequality: Total size = .
    3. Substitute given values: .
    4. Simplify the inequality: .
    5. Solve for : .
    6. Apply integer constraint: The maximum number of pointers must be an integer, so we take the floor, yielding .