Possible Viva Questions โ‰ˆ44 marks

67 questions the examiner is likely to ask on this project, grouped by task, each with a model answer short enough to say out loud. Click a question to reveal the answer โ€” try to answer first.

The viva is worth roughly 44 of the 120 marks โ€” more than any single written task. Written work that you cannot defend loses those marks, so read every answer here beside the task page it belongs to.

Task 1 โ€” Design & ER diagram 4 viva marks

Expect โ€œwhy did you model it that way?โ€ โ€” every answer should name a business rule from the scenario.

T1.1What is the difference between an entity, an entity set and an entity type?
T1.2Define super key, candidate key and primary key, with an example from your design.
T1.3Why did you choose employee_id as the primary key instead of email or national_id?
T1.4What are the attribute types in the ER model? Which do you have?
T1.5Why did you store gross_salary and net_salary if they are derived?
T1.6What is a weak entity set? Do you have one?
T1.7Explain mapping cardinality and participation in your diagram.
T1.8Why does LEAVE_APPLICATION have two links to EMPLOYEE?
T1.9What is a domain, and how did you enforce it?
T1.10How do you convert your ER diagram to relations?

Task 2 โ€” MySQL, queries, triggers & access control 12 viva marks

The largest viva block. Be ready to explain any constraint, any clause and any trigger line.

T2.1What are the integrity constraints and which one enforces which rule?
T2.2How exactly does the โ€œonly one Active salary per employeeโ€ constraint work?
T2.3Explain your ON DELETE choices.
T2.4Why ENGINE=InnoDB?
T2.5What is the difference between WHERE and HAVING? (Query 5)
T2.6Why did Query 4 need a subquery?
T2.7What is the difference between % and _ in LIKE?
T2.8What is a trigger and when would you use one?
T2.9Why is the late-attendance trigger BEFORE INSERT and not AFTER?
T2.10When do you use NEW and OLD?
T2.11Why do you need DELIMITER // around a trigger?
T2.12Why log deleted leave applications instead of just deleting them?
T2.13What is DCL and how did you apply least privilege?
T2.14What are DDL, DML, DCL and TCL?
T2.15How would you speed up a slow attendance report?

Task 3 โ€” RAID & recovery 12 viva marks

Heaviest viva-to-writing ratio in the whole project. Know XOR cold, and know RAIDโ€™s limits.

T3.1What does RAID stand for and why use it?
T3.2Describe RAID level 4.
T3.3Why XOR, and not addition?
T3.4Show how you computed P.
T3.5D5 fails. Recover it.
T3.6How many disks can RAID 4 lose?
T3.7What is RAID 4โ€™s main weakness?
T3.8Does a write have to read all six data disks to update parity?
T3.9Compare RAID 0, 1, 4, 5 and 6.
T3.10Is RAID a backup?
T3.11What other recovery mechanisms does a DBMS use?
T3.12Which ACID property is recovery mainly about?

Task 4 โ€” Normalization 10 viva marks

You must be able to state each normal form in one sentence and point to the exact dependency you removed.

T4.1What is normalization and why do it?
T4.2Define a functional dependency.
T4.3State 1NF, 2NF and 3NF in one line each.
T4.4Which dependency violated 2NF in your table?
T4.5Which dependency violated 3NF?
T4.6Can a table in 1NF ever be automatically in 2NF?
T4.7What is BCNF and are your tables in it?
T4.8What is a lossless decomposition?
T4.9Give a concrete anomaly your normalization removed.
T4.10When would you deliberately denormalize?
T4.11What is 4NF?

Task 5 โ€” Hashing & indexing 13 viva marks

The biggest single viva block. Be ready to re-draw a split live and to justify B+ over B and over hashing.

T5.1What is an index and what does it cost?
T5.2Difference between a primary/clustered and a secondary index?
T5.3Difference between dense and sparse index?
T5.4What is a B-Tree? What makes it balanced?
T5.5Why did the height increase when you inserted 19?
T5.6Key difference between a B-Tree and a B+ Tree?
T5.7Copy up vs push up โ€” explain.
T5.8Why do databases prefer B+ Trees?
T5.9Trace a search for employee_id 21 in your B+ tree.
T5.10How would you answer BETWEEN 13 AND 20?
T5.11What is hashing, and when does it beat a B+ tree?
T5.12What are collisions and how are they handled?
T5.13Static vs dynamic hashing?
T5.14Which index would you actually create on this HR database?

General / cross-cutting asked anywhere

Openers and closers the examiner uses to check you understand the project as a whole.

GEN.1Explain your project in one minute.
GEN.2Which queries from the scenario does your design answer?
GEN.3What would you improve if you had more time?
GEN.4What is the difference between a database, a DBMS and a database system?
GEN.5How does the DBMS keep two HR officers from corrupting the same row?
Three habits that earn viva marks. (1) Always tie a design choice back to a sentence in the scenario โ€” โ€œthe system should not allow more than one attendance record per employee per dateโ€ โ†’ UNIQUE(employee_id, attendance_date). (2) Give the definition first, then your example. (3) Name the trade-off you accepted โ€” normalization vs joins, RAID 4 parity disk vs write throughput, index speed vs write cost. Examiners reward the trade-off sentence more than the definition.