📘 Toppers’ Handbook
Comprehensive Exam Revision Notes
With Formulas, Solved Numericals, and Quick Cheatsheets
Database Management Systems (DBMS)
A Database Management System (DBMS) allows users to create, manage, and query
databases efficiently.
Keys
• Primary Key – Unique identifier.
• Candidate Key – Minimal superkey.
• Foreign Key – References another table.
Codd’s 12 Rules
E.F. Codd proposed 12 rules for a system to qualify as a true RDBMS.
Example MCQ: Q: How many rules? → A: 12
Relational Algebra
σ_condition(R) → Selection
π_attributes(R) → Projection
R ⋈ S → Join
Normalization
Normalization reduces redundancy. Steps: 1NF → 2NF → 3NF → BCNF.
Transaction Management
Strict 2PL: All write locks are held until commit/abort → ensures recoverability + avoids
cascading aborts.
Indexing Example (B+ Tree Order)
Q: Block size = 1KB, Record Ptr=7B, Value=9B, Block Ptr=6B. Find order?
Total space = 1024B
Each entry = 7+9 = 16B
Order = floor((1024-6)/16) = 63
Operating Systems (OS)
CPU Scheduling
Turnaround Time = Completion Time – Arrival Time
Waiting Time = Turnaround Time – Burst Time
Example (FCFS Scheduling)
Process: P1(AT=0,BT=5), P2(AT=1,BT=3)
Gantt Chart: [P1:0-5][P2:5-8]
Avg Waiting = (0 + 4)/2 = 2
Avg Turnaround = (5+7)/2 = 6
Deadlocks (Banker's Algorithm)
Steps: 1. Work=Available, 2. Finish[i]=false, 3. Find i with Need<=Work, 4. If found,
Work+=Allocation, Finish[i]=true.
Computer Networks (CN)
OSI vs TCP/IP
Physical → Bits
Data Link → Frames
Network → Packets/Datagrams
Transport → Segments (TCP)/Datagrams (UDP)
Application → Messages
Flow Control & ARQ
• Stop-and-Wait ARQ
• Go-Back-N
• Selective Repeat
Subnetting Example
Q: Subnet mask 255.255.255.224 → Direct Broadcast?
Block size = 32 addresses
Broadcast = Last address of subnet
Answer: Both 202.15.19.63 and 202.15.19.127
Software Engineering (SE)
Software Metrics
LOC Productivity Example
Total LOC = 5000, Effort = 50 PM
Productivity = 5000 / 50 = 100 LOC/PM
System Analysis & Design (SAD)
Cost-Benefit Analysis
NPV = Σ (Cash Flow_t / (1+r)^t) – Initial Investment
Q: Invest 10000, inflow=3000/year, r=10%, n=5
NPV = 3000*(1-1.1^-5)/0.1 – 10000
≈ 1373 → Project is viable
Quick Revision Cheatsheet
• DBMS: Codd’s Rules=12, Strict 2PL, B+Tree Order
• OS: TT=CT-AT, WT=TT-BT
• CN: OSI Layers Mnemonic – Please Do Not Touch Steve’s Apple
• SE: LOC Productivity = LOC/PM
• SAD: NPV Formula