chapter

    Database Management and Warehousing Pyqs for Gate Da

    GATE DA Database Management and Warehousing: 2 units and 6 chapters, weightage from 22 previous year questions across 3 papers, a study order by exam weight a

    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)
    Question 5
    2026 PYQ
    Level 3: Exam Standard
    Consider that the visualization of a 3-dimensional data cube is showing Sales Quantity for each combination of the attributes Product Type, Month and Country.
    From this, if we want to further visualize the Sales Quantity for each combination of Product Type, Month and State, which of the following OLAP operations should be performed?
    Question 6
    2026 PYQ
    Level 3: Exam Standard
    Consider the concept hierarchies as shown in the figure.

    Year Month Day Country State City Item Category Item Type Item

    Which of the following options denotes the total number of possible data cuboids from these concept hierarchies?
    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 Management and Warehousing PYQs for GATE DA

    GATE DA Database Management and Warehousing: 2 units and 6 chapters, weightage from 22 previous year questions across 3 papers, a study order by exam weight and 1975 practice questions.

    About Database Management and Warehousing Previous Year Questions (PYQs)

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

    GATE DA Database Management and Warehousing Unit-wise Weightage from Past Papers

    We counted every GATE DA Database Management and Warehousing previous year question in our bank (22 questions from 3 papers) and grouped them by unit.

    UnitChaptersPYQsShare of sectionAvg per paper
    Database Systems41986%6.3
    Data Warehousing2314%1

    Suggested Database Management and Warehousing Study Order for GATE DA

    1. Database Systems: 86% of past Database Management and Warehousing questions, about 6.3 per paper.
    2. Data Warehousing: 14% of past Database Management and Warehousing questions, about 1 per paper.

    Start where the marks are. Units at the top of this list have appeared most often in past GATE DA papers.

    Units in GATE DA Database Management and Warehousing

    All Database Management and Warehousing chapters

    One Solved Question from Each Database Management and Warehousing 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 .
    Question 5 · OLAP Operations and Data Cube Aggregation · 2026 MCQ
    Consider that the visualization of a 3-dimensional data cube is showing Sales Quantity for each combination of the attributes Product Type, Month and Country.
    From this, if we want to further visualize the Sales Quantity for each combination of Product Type, Month and State, which of the following OLAP operations should be performed?
    1. A.

      Slicing

    2. B.

      Dicing

    3. C.

      Roll-up

    4. D.

      Drill-down

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: This is an OLAP operation identification question. Moving from a higher-level concept (Country) to a lower-level concept (State) along a dimension hierarchy is a Drill-down.

    Exam route: Country State is descending the hierarchy. Descending = Drill-down.

    Learning route:

    1. Identify the dimensions involved: The dimensions remain Product Type, Month, and the geographic attribute.
    2. Identify the change in the geographic attribute: We are moving from Country to State.
    3. Determine the hierarchy direction: Country is a higher level of granularity than State. Moving from Country to State means moving from a broader category to a more detailed one.
    4. Match with OLAP operations: Moving down the hierarchy to reveal finer details is defined as Drill-down.

    Answer: Drill-down (Option D).

    Question 6 · Concept Hierarchies and Multidimensional Data Models · 2026 MCQ
    Consider the concept hierarchies as shown in the figure.

    Year Month Day Country State City Item Category Item Type Item

    Which of the following options denotes the total number of possible data cuboids from these concept hierarchies?
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: The total number of possible data cuboids equals the product of the number of aggregation levels in each dimension's concept hierarchy, including the implicit "ALL" level.

    Exam route: There are 3 dimensions. Each hierarchy explicitly shows 3 levels. Adding the implicit "ALL" level gives 4 levels per dimension. Total cuboids = .

    Learning route:

    Step 1: Identify the dimensions. The figure shows 3 separate concept hierarchies, representing 3 independent dimensions (e.g., Time, Location, Product).

    Step 2: Determine the number of levels in each hierarchy. Each hierarchy explicitly shows 3 levels (e.g., Day Month Year). In OLAP, there is always an implicit top-level "ALL" (or grand total) aggregation level. Thus, each dimension has levels.

    Step 3: Calculate the total number of cuboids. A data cuboid is formed by selecting exactly one aggregation level from each dimension. The total number of combinations is the product of the number of levels across all dimensions: .

    Tempting wrong path: A student might count only the explicit nodes shown in the diagram (3 per dimension) and calculate . This breaks at the assumption that the "ALL" level is optional; in a complete data cube, the grand total is always a valid cuboid.

    Generalization: Total cuboids = .

    Verification: Plugging in 3 explicit levels per dimension gives , which perfectly matches Option A.