Final Exam Prep

The 40-mark final decoded, plus the Spring 2026 paper solved question by question — SQL basics, views & integrity, trigger & function, RAID mapping, MTTDL and parity recovery.

Sections

Quick summary

FINAL: CSE 303 · Full marks 40 · 2 hours · answer ALL · partial grading ON.
   CLO1 = 18 marks (Parts 1–2) · CLO2 = 22 marks (Parts 3–4).

PART 1 — SQL Basics                      8 marks
   (a) COUNT by designation + join to teaches + year filter  [3]
   (b) COUNT(DISTINCT student) over the 4-part section key   [3]
   (c) count of students per program                          [2]
PART 2 — Views, Integrity, Authorization 10 marks
   Q2 create a view of faculty count, then MAX subquery on it [3+3]
   Q3 define referential integrity + CREATE TABLE with cascades [1+3]
PART 3 — Function & Trigger               9 marks
   Q4 AFTER UPDATE trigger → salary_log (only if changed) + employee_audit [5]
   Q5 stored function get_emp_salary(emp_id)                   [4]
PART 4 — Storage & File Structure        13 marks
   Q6 RAID level ↔ elaborated name mapping (0=b 1=f 2=g 3=e 4=d 5=a 6=c) [3]
   Q7 MTTDL = MTTF²/(2·MTTR); 50,000 h & 5 h ⇒ 2.5×10⁸ h ≈ 28,500 yrs [3+1.5]
   Q8 RAID 4 on 968: 4-bit blocks, P = 0111 = 7, recover D1 = 1001 = 9 [1+2.5+2]

STRATEGY: bank Part 4 first (recall + arithmetic), then the trigger/function templates,
then the views, and leave the Part-1 queries for last.