Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Database Management Systems (DBMS) Module 16

GATE and interview readiness: questions

Questions on GATE and interview readiness: short warm-ups, then what each harder question tests, the first step of a good answer and its follow-ups.

8 questions: 3 warm-ups and 5 with model answers · Levels: Fresher to senior

Warm-up questions

Short questions with short answers, each answered in full.

  1. Fresher

    Under negative marking of one third, when does answering an MCQ you are unsure of raise your expected score?

    Answered in the lesson GATE databases: syllabus map and strategy

  2. Fresher

    In the DA databases syllabus, does "normalization" mean normal forms?

    Answered in the lesson GATE databases: syllabus map and strategy

  3. Fresher

    What is the difference between UNION and UNION ALL?

    Answered in the lesson DBMS interview questions explained properly

Questions with model answers

What each question tests, the first step of a good answer and the follow-ups to expect.

  1. Fresher

    In timed database sets you leave every 2-mark MCQ blank unless you are sure of it. Your log shows that when you narrow such a question to two options, you pick the right one 55 % of the time. Should you change the habit? Estimate what it is worth over the 8 such questions a typical set gives you.

    What it tests
    Expected marks under negative marking, turning a measured accuracy into a decision, and judging how far one estimate can be trusted.
    First step
    Write down the value of one answer: a 2-mark MCQ earns 2 marks with probability p and costs 2/3 of a mark otherwise, so it is worth 2(4p − 1)/3 on average. Put in p = 0.55 and compare the result with the 0 that a blank scores.
    Follow-ups

    From the lesson GATE databases: syllabus map and strategy

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page.

    Opening the model answers with your pass…

    Model answers open with any MySmartCoPilot pass.

    • Pro pass · 1 week₹79$2.99
    • 30 days₹179$5.99
    • 1 year₹1,699$45

    One payment; nothing renews unless you choose to. The price shown is the total you pay: no fees or charges are added at checkout.

    It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  2. Fresher

    Six weeks before the exam, your mistake log shows that most of the database marks you lose come from normal forms and serializability questions, while you almost never miss an SQL output question. Plan the remaining database revision with spaced reviews and timed sets, and defend how you split the time.

    What it tests
    Turning a mistake log into a plan, choosing practice testing and spacing over rereading, and pacing timed sets from the paper's marks and minutes.
    First step
    Start from the log, not from the syllabus order. Count the lost marks by topic and by cause: not known, misread, a slip, or time. The topics that lose the most marks get most of the new study time, and the cause decides what kind of practice each one gets.
    Follow-ups

    From the lesson GATE databases: syllabus map and strategy

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  3. Mid to senior

    On MySQL with InnoDB, SELECT * FROM orders WHERE customer_id = ? uses a secondary index on customer_id, returns 2,000 rows and takes 400 ms, while the same query selecting only order_id, the primary key, takes 5 ms. Explain the gap, give two fixes, and say how PostgreSQL would differ.

    What it tests
    What an InnoDB secondary index entry holds, the cost of the second lookup per row, covering indexes, and the heap and visibility map in PostgreSQL.
    First step
    Both forms read the same 2,000 entries of the same index, so the 395 ms must come from what happens after each entry is found. Start from what an index entry stores, and count the B-tree searches each form of the query needs per row.
    Follow-ups

    From the lesson DBMS interview questions explained properly

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  4. Mid to senior

    Two requests withdraw 300 and 500 from a wallet holding 1,000 at the same moment. Each runs BEGIN, reads the balance, computes the new balance in the application, writes it with UPDATE and commits. At the default isolation levels of PostgreSQL and MySQL InnoDB, can money be lost? How do you fix it?

    What it tests
    Lost updates in a read-modify-write, what the default isolation levels of PostgreSQL and InnoDB really do, and choosing between atomic updates, row locks and retries.
    First step
    Write the interleaving first: both requests read 1,000 before either writes, so one computes 700 and the other 500. Then decide, for each engine's default isolation level, what the second UPDATE sees when it runs: the snapshot of its own transaction, or the latest committed row.
    Follow-ups

    From the lesson DBMS interview questions explained properly

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  5. Mid to senior

    Design the tables for a ticketing site that holds a chosen seat for 10 minutes while the buyer pays. Two people must never hold or buy the same seat, and holds must expire without a cleanup job. Walk through keys, constraints and indexes, and say what happens when two requests claim the same seat at once.

    What it tests
    Running a schema-design round in order, using keys and constraints as guarantees rather than application checks, and reasoning about concurrent claims under real isolation behaviour.
    First step
    State the invariants before drawing any table: a seat is free, held until a time, or sold; at most one live hold per seat; at most one sale per seat. Then, for each invariant, ask which feature of the database can enforce it, so that no application check has to.
    Follow-ups

    From the lesson DBMS interview questions explained properly

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 4 minutes

All Database Management Systems (DBMS) interview questions · The Database Management Systems (DBMS) track

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.