CS Atlas GATE 2027
DBMS course
0 / 119 complete

DBMS/Phase 7 · Integration & Final Test

Final test 7.4.1 · Item 119 of 119

Final end-to-end test (30 questions, 90 min)

Read at your own pace. Try the questions before opening the answers.

On this page

Thirty questions covering all phases (45 marks). Set a 90-minute timer and work on paper. For MSQ, record every correct option; for NAT, record a number. When you finish, open the final answer key below to check your work.

Running data used by some questions:

rollnamedeptcgpa
1AshaCS9.1
2BhavinEE7.8
3ChiragCS8.4
4DiyaME6.9
5EshaCSNULL

STUDENT

cidtitledeptcredits
C1DBMSCS4
C2NetworksCS3
C3CircuitsEE4
C4ThermoME3

COURSE

rollcidgrade
1C1A
1C2B
1C3A
2C3B
3C1B
3C2A
4C4C

ENROLL

30 questions · 45 marks · 90 minutes. Negative marking on MCQ only: −1/3 mark for a wrong 1-mark MCQ, −2/3 for a wrong 2-mark MCQ. No negative marking for MSQ or NAT; MSQ has no partial credit.

Q1 · MCQ · 1 mark(s) — ER notation

In an ER diagram, a dashed ellipse represents:

  1. (A) a key attribute
  2. (B) a weak entity
  3. (C) a multivalued attribute
  4. (D) a derived attribute

Q2 · NAT · 2 mark(s) — ER to tables

E1 (with 2 multivalued attributes) —1:N— E2 —M:N— E3, and E3 —1:1, both total— E4. Minimum number of tables?

Your answer:

Q3 · NAT · 1 mark(s) — Superkeys

R(A, B, C, D, E) has candidate keys {A, B} and {C}. How many superkeys?

Your answer:

Q4 · NAT · 2 mark(s) — Cascading delete

T(id, parent), parent → T.id ON DELETE CASCADE, holds (1, NULL), (2, 1), (3, 1), (4, 2), (5, 4), (6, 3), (7, 6), (8, NULL), (9, 8). After deleting id 3, how many tuples remain?

Your answer:

Q5 · MSQ · 1 mark(s) — Integrity

ENROLL.roll references STUDENT.roll (no referential actions declared). Which operations can violate referential integrity?

  1. (A) Inserting into STUDENT
  2. (B) Inserting into ENROLL
  3. (C) Deleting from STUDENT
  4. (D) Deleting from ENROLL

Q6 · NAT · 1 mark(s) — Projection

How many tuples are in πdept(σcgpa > 7(STUDENT))?

Your answer:

Q7 · MCQ · 2 mark(s) — Division

πroll, cid(ENROLL) ÷ πcid(σdept='CS'(COURSE)) is:

  1. (A) {1, 2, 3}
  2. (B) {3}
  3. (C) {1}
  4. (D) {1, 3}

Q8 · NAT · 2 mark(s) — Natural join

How many tuples are in STUDENT ⋈ COURSE (natural join)?

Your answer:

Q9 · MCQ · 1 mark(s) — TRC safety

Which tuple relational calculus expression is unsafe?

  1. (A) { t | ¬(t ∈ R) }
  2. (B) { t | t ∈ R ∧ t.A > 5 }
  3. (C) { t | t ∈ R ∨ t ∈ S }
  4. (D) { t | t ∈ R ∧ ¬(t ∈ S) }

Q10 · NAT · 2 mark(s) — NULL logic

SELECT COUNT(*) FROM STUDENT WHERE NOT (cgpa > 8 AND dept = 'CS');

Your answer:

Q11 · NAT · 2 mark(s) — GROUP BY

How many rows: SELECT dept FROM STUDENT GROUP BY dept HAVING AVG(cgpa) > 7;

Your answer:

Q12 · MCQ · 2 mark(s) — Correlated subquery

SELECT S1.name FROM STUDENT S1 WHERE (SELECT COUNT(*) FROM STUDENT S2 WHERE S2.cgpa > S1.cgpa) < 2; returns:

  1. (A) Asha, Chirag
  2. (B) Asha
  3. (C) Asha, Chirag, Esha
  4. (D) Asha, Bhavin, Chirag

Q13 · NAT · 1 mark(s) — Outer join

SELECT COUNT(*) FROM COURSE C LEFT JOIN ENROLL E ON C.cid = E.cid AND E.grade = 'B';

Your answer:

Q14 · NAT · 1 mark(s) — Bag operations

R holds the values 1, 1, 1, 2, 3 and S holds 1, 2, 2. How many rows are in R EXCEPT ALL S?

Your answer:

Q15 · NAT · 2 mark(s) — Candidate keys

R(A, B, C, D, E, F), F = {AB → C, C → D, D → A, E → F}. How many candidate keys?

Your answer:

Q16 · MCQ · 2 mark(s) — Normal forms

R(A, B, C, D, E), F = {A → BC, C → D, BD → E}. Highest normal form?

  1. (A) 1NF
  2. (B) 2NF
  3. (C) 3NF
  4. (D) BCNF

Q17 · NAT · 1 mark(s) — Minimal cover

How many FDs are in a minimal cover of {A → BC, B → C, AB → D}?

Your answer:

Q18 · MCQ · 2 mark(s) — Decomposition

R(A, B, C, D), F = {A → B, B → C, C → D}, decomposed into {AB, BC, CD}. It is:

  1. (A) lossless and dependency preserving
  2. (B) lossless, not preserving
  3. (C) lossy, preserving
  4. (D) lossy, not preserving

Q19 · MSQ · 1 mark(s) — BCNF

Which statements are true?

  1. (A) Every BCNF relation is in 3NF.
  2. (B) Every relation with two attributes is in BCNF.
  3. (C) 3NF allows an FD X → A with X not a superkey if A is prime.
  4. (D) A lossless BCNF decomposition always preserves dependencies.

Q20 · NAT · 1 mark(s) — Blocking factor

B = 4096 bytes, R = 250 bytes, unspanned. Blocking factor?

Your answer:

Q21 · NAT · 2 mark(s) — Multilevel index

r = 250,000 records, a secondary index on a key field, K = 10, P = 6, B = 1024. Block accesses to fetch one record through the multilevel index?

Your answer:

Q22 · NAT · 2 mark(s) — B+ tree order

B = 2048, K = 14, Pr = 10, P = 6. Order of a B+ tree leaf node (number of key–record-pointer pairs)?

Your answer:

Q23 · NAT · 1 mark(s) — B-tree insertion

A B-tree whose nodes hold at most 2 keys starts empty; insert 1, 2, 3, 4, 5, 6, 7, 8 in order. How many node splits occur?

Your answer:

Q24 · NAT · 1 mark(s) — B-tree bounds

B-tree of order 7 (max children), height 3. Minimum number of keys?

Your answer:

Q25 · MCQ · 2 mark(s) — Conflict serializability

S = R1(X) R2(Z) R1(Z) R3(X) R3(Y) W1(X) W3(Y) R2(Y) W2(Z) W2(Y). Which is true?

  1. (A) S is conflict equivalent to T2, T3, T1
  2. (B) S is conflict equivalent to T3, T1, T2
  3. (C) S is not conflict serializable
  4. (D) S is conflict equivalent to T1, T2, T3

Q26 · MCQ · 1 mark(s) — Recoverability

W1(A) R2(A) C1 W2(A) C2 is:

  1. (A) strict
  2. (B) not recoverable
  3. (C) recoverable but not cascadeless
  4. (D) cascadeless but not strict

Q27 · MCQ · 2 mark(s) — View serializability

S = R1(A) W2(A) R3(A) W1(A) W3(A). Which is true?

  1. (A) S is conflict serializable
  2. (B) S is view serializable but not conflict serializable
  3. (C) S is neither
  4. (D) S is serial

Q28 · MCQ · 1 mark(s) — 2PL

Which statement about basic two-phase locking is false?

  1. (A) It guarantees conflict serializability.
  2. (B) The serial order follows the lock points.
  3. (C) It prevents deadlock.
  4. (D) It may allow cascading rollbacks.

Q29 · MCQ · 1 mark(s) — Deadlock prevention

Wound-wait. T1 (TS = 10) holds item Q; T2 (TS = 5) requests Q. What happens?

  1. (A) T2 waits
  2. (B) T1 is rolled back
  3. (C) T2 is rolled back
  4. (D) Both wait

Q30 · NAT · 2 mark(s) — Timestamp ordering

TS(T1) = 1, TS(T2) = 2, TS(T3) = 3. Under basic timestamp ordering, schedule R2(A) W1(A) R3(B) W2(B) W3(A). How many transactions are aborted?

Your answer:

Show the key

🎓 That is the whole course.

Final answer key

Reveal answers when you’re ready

Stop here until you have finished the 90-minute final test.

🔑 Open the full answer key

Q1 Answer: (D) · 1 mark(s)

Dashed = derived.

  • (A) is wrong: Underlined.
  • (B) is wrong: Double rectangle.
  • (C) is wrong: Double ellipse.

Re-read: Lesson 1.1.2 — Attribute types: simple/composite, single/multivalued, stored/derived, NULL-able, key attribute

Q2 Answer: 6 · 2 mark(s)

E1, E2, E3+E4 merged (3) + M:N (1) + 2 multivalued (2).

Re-read: Lesson 2.4.2 — Mapping 1:1, 1:N, M:N with participation; minimum number of tables

Q3 Answer: 20 · 1 mark(s)

Contain AB: 8. Contain C: 16. Contain ABC: 4. 8 + 16 − 4.

Re-read: Lesson 2.2.1 — Superkey, candidate key, primary key, alternate key; counting superkeys

Q4 Answer: 6 · 2 mark(s)

3 → 6 → 7 are deleted.

Re-read: Lesson 2.3.2 — Referential actions: restrict, cascade, set null; tracing cascading deletes

Q5 Answer: (B) (C) · 1 mark(s)

New child rows and removed parents.

  • (A) is wrong: Adding a parent is safe.
  • (D) is wrong: Removing a child is safe.

Re-read: Lesson 2.3.1 — Domain, key, entity and referential integrity; which operations violate what

Q6 Answer: 2 · 1 mark(s)

CS and EE (Esha's NULL is UNKNOWN; Diya fails).

Re-read: Lesson 3.1.1 — Selection, projection, rename; composing operations

Q7 Answer: (D) · 2 mark(s)

CS courses C1, C2: rolls 1 and 3 took both.

  • (A) is wrong: Roll 2 took neither.
  • (B) is wrong: Roll 1 also qualifies.
  • (C) is wrong: Roll 3 also took both.

Re-read: Lesson 3.1.5 — Division and for-all queries

Q8 Answer: 8 · 2 mark(s)

The common attribute is dept: CS 3 × 2, EE 1 × 1, ME 1 × 1.

Re-read: Lesson 3.1.3 — Cartesian product, theta join, equijoin, natural join

Q9 Answer: (A) · 1 mark(s)

t is not restricted to any relation.

  • (B) is wrong: Safe.
  • (C) is wrong: Both branches restrict t.
  • (D) is wrong: R restricts t.

Re-read: Lesson 3.2.3 — Safe vs unsafe expressions; relational completeness

Q10 Answer: 2 · 2 mark(s)

Asha, Chirag: TRUE inside → FALSE. Bhavin, Diya: FALSE inside → TRUE. Esha: UNKNOWN AND TRUE = UNKNOWN → UNKNOWN.

Re-read: Lesson 3.3.4 — NULL in SQL: three-valued logic, IS NULL, comparisons

Q11 Answer: 2 · 2 mark(s)

CS 8.75, EE 7.8, ME 6.9.

Re-read: Lesson 3.3.5 — Aggregates, GROUP BY, HAVING; COUNT(*) vs COUNT(col); NULL handling

Q12 Answer: (C) · 2 mark(s)

Asha has 0 above, Chirag 1; for Esha every S2.cgpa > NULL is UNKNOWN, so the count is 0.

  • (A) is wrong: Misses Esha.
  • (B) is wrong: Chirag has only one above.
  • (D) is wrong: Bhavin has two above.

Re-read: Lesson 3.3.9 — Correlated subqueries; for-all in SQL; tracing a query on a table instance

Q13 Answer: 4 · 1 mark(s)

B grades in C1, C2, C3 (one each); C4 is padded.

Re-read: Lesson 3.3.6 — Joins in SQL: INNER, NATURAL, LEFT/RIGHT/FULL OUTER

Q14 Answer: 3 · 1 mark(s)

1: 3 − 1 = 2; 2: 0; 3: 1.

Re-read: Lesson 3.3.7 — UNION / INTERSECT / EXCEPT and their ALL variants

Q15 Answer: 3 · 2 mark(s)

ABE, BCE, BDE.

Re-read: Lesson 4.2.3 — Attribute closure; all candidate keys; prime vs non-prime; counting superkeys

Q16 Answer: (B) · 2 mark(s)

Only key A. C → D: C not a superkey, D non-prime, C not part of a key: transitive.

  • (A) is wrong: Single-attribute key: no partial dependency.
  • (C) is wrong: C → D violates 3NF.
  • (D) is wrong: No.

Re-read: Lesson 4.4.5 — Drill: highest normal form of a given relation

Q17 Answer: 3 · 1 mark(s)

{A → B, B → C, A → D}.

Re-read: Lesson 4.2.5 — Minimal (canonical) cover

Q18 Answer: (A) · 2 mark(s)

Chase succeeds through B → C, C → D; each FD lies in a piece.

  • (B) is wrong: All FDs are inside pieces.
  • (C) is wrong: It is lossless.
  • (D) is wrong: Both hold.

Re-read: Lesson 4.3.2 — Dependency preservation

Q19 Answer: (A) (B) (C) · 1 mark(s)

BCNF may lose dependencies.

  • (D) is wrong: Not always.

Re-read: Lesson 4.4.4 — BCNF; 3NF vs BCNF trade-off

Q20 Answer: 16 · 1 mark(s)

⌊4096/250⌋.

Re-read: Lesson 5.1.1 — Storage basics: disk, blocks, block access cost, records, blocking factor, spanned vs unspanned

Q21 Answer: 4 · 2 mark(s)

fo = 64; 64² < 250,000 ≤ 64³ → 3 levels; + 1.

Re-read: Lesson 5.3.3 — Multilevel indexes; fan-out; logarithm primer

Q22 Answer: 85 · 2 mark(s)

24 p_leaf + 6 ≤ 2048 → 85.

Re-read: Lesson 5.6.2 — B+ tree order from block size, key size and pointer size

Q23 Answer: 4 · 1 mark(s)

Same as the 10 … 70 trace for 1 … 7; inserting 8 goes into [7] without a split.

Re-read: Lesson 5.5.2 — B-tree search and insertion with node splits

Q24 Answer: 31 · 1 mark(s)

m = 4: 2·4² − 1.

Re-read: Lesson 5.5.3 — B-tree deletion basics; min/max keys; height bounds

Q25 Answer: (B) · 2 mark(s)

R3(X) before W1(X): T3 → T1. R1(Z) before W2(Z): T1 → T2. W3(Y) before R2(Y) and W2(Y): T3 → T2.

  • (A) is wrong: T1 must precede T2.
  • (C) is wrong: Acyclic.
  • (D) is wrong: T3 must precede T1.

Re-read: Lesson 6.4.2 — Conflict serializability: conflicting ops, precedence graph, equivalent serial orders

Q26 Answer: (C) · 1 mark(s)

T2 reads uncommitted A; T1 commits first.

  • (A) is wrong: No.
  • (B) is wrong: Commit order is fine.
  • (D) is wrong: The read is dirty.

Re-read: Lesson 6.5.1 — Recoverable, cascadeless and strict schedules; how they nest

Q27 Answer: (B) · 2 mark(s)

Cycle between T1 and T2; view equivalent to T1, T2, T3 (T1 reads initial A, T3 reads from T2, T3 writes last).

  • (A) is wrong: Cycle.
  • (C) is wrong: It is VS.
  • (D) is wrong: Interleaved.

Re-read: Lesson 6.4.3 — View serializability; blind writes; relation to conflict serializability

Q28 Answer: (C) · 1 mark(s)

Deadlocks can occur.

  • (A) is wrong: True.
  • (B) is wrong: True.
  • (D) is wrong: True.

Re-read: Lesson 6.6.2 — Two-phase locking: growing/shrinking, lock point, guarantees

Q29 Answer: (B) · 1 mark(s)

Older T2 wounds the younger holder.

  • (A) is wrong: Older requesters do not wait in wound-wait.
  • (C) is wrong: That would be wait-die for a younger requester.
  • (D) is wrong: No.

Re-read: Lesson 6.6.4 — Deadlocks: wait-for graph, wait-die, wound-wait, starvation

Q30 Answer: 2 · 2 mark(s)

W1(A) fails (RTS(A) = 2), W2(B) fails (RTS(B) = 3); W3(A) succeeds.

Re-read: Lesson 6.7.1 — Timestamp ordering protocol; Thomas write rule

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.