UNIT 1: Database Management System - Comprehensive Short Notes
(Aligned with RGPV CY-405 Past Paper Analysis)
I. Foundations of DBMS
DBMS vs Traditional File Systems
| Aspect | File System | DBMS |
|---|---|---|
| Data Storage | Files in OS directories | Integrated, structured storage |
| Data Redundancy | High (data duplicated across files) | Low (controlled via normalization) |
| Data Consistency | Difficult to maintain | Enforced via integrity constraints |
| Data Sharing | Limited, application-dependent | Concurrent, controlled access |
| Security & Integrity | Minimal, OS-level only | Fine-grained (user/role-based) |
| Backup & Recovery | Manual, error-prone | Automated (logs, checkpoints) |
| Data Independence | Not supported | Logical & Physical independence |
| Query Processing | Application-specific code | High-level languages (SQL), optimization |
Advantages of DBMS:
- Reduced Redundancy: Single storage, multiple views.
- Data Integrity: Constraints (domain, referential).
- Security: Authentication, authorization.
- Concurrent Access: Locking, timestamp protocols.
- Backup & Recovery: ACID transactions, logs.
- Data Abstraction: Three-level architecture.
DBMS Architecture (Three-Level Schema)
External Level (User Views)
↑
Conceptual Level (Logical Schema - Community View)
↑
Internal Level (Physical Storage - OS/File System)
-
External Schema/View: User-specific logical views.
CREATE VIEW. -
Conceptual Schema: Global logical structure (tables, constraints). Single copy.
-
Internal Schema: Physical storage details (files, indexes, RAID).
-
Mappings:
-
External-Conceptual: Multiple-to-one.
-
Conceptual-Internal: One-to-one.
-
-
DBA Functions: Schema definition, security, backup, performance tuning.
Data Independence
-
Logical Data Independence: Changes to conceptual schema (e.g., add table) do not affect external schemas/applications.
-
Physical Data Independence: Changes to internal schema (e.g., file organization, indexes) do not affect conceptual schema.
Example: Adding an index (physical) doesn't change table structure (logical).
Schema vs Instance
-
Schema (Intension): Structure/design of database (tables, columns, types). Fixed.
-
Instance (Extension): Actual data stored at a moment. Changes with
INSERT/UPDATE/DELETE.
Categories of Database Users
-
End Users: Casual (ad-hoc queries), Naïve (forms), Sophisticated (complex queries).
-
Application Programmers: Write application code (C++, Java) using embedded SQL/ODBC/JDBC.
-
DBA (Database Administrator): Manages DBMS (security, backup, tuning, schema design).
II. Data Modeling and ER Diagrams
ER Model Basics
-
Entity: Real-world object (e.g.,
Student). Represented by rectangle. -
Attribute: Property of entity (e.g.,
Roll_no). Represented by ellipse. -
Relationship: Association among entities (e.g.,
Enrolls). Represented by diamond. -
Key Attribute: Underlined ellipse.
Types of Attributes
| Type | Description | Example |
|---|---|---|
| Simple | Atomic, indivisible | Age (integer) |
| Composite | Composed of sub-attributes | Address (street, city, pin) |
| Multivalued | Set of values | Phone_No (multiple numbers) |
| Derived | Computed from other attributes | Age from DOB |
| Stored | Physically stored | DOB |
Types of Relationships & Cardinality
-
Degree: Number of participating entities (binary, ternary).
-
Cardinality:
-
1:1 (One-to-One): One entity associates with at most one of other.
-
1:M (One-to-Many): One entity associates with many of other.
-
M:N (Many-to-Many): Many entities associate with many of other.
-
Representation: Lines with
1,N, orMnear entities.
Weak vs Strong Entity Sets
| Strong Entity | Weak Entity |
|---|---|
| Has primary key (own attributes). | No primary key; uses partial key + identifying relationship + owner's key. |
| Represented by single rectangle. | Represented by double rectangle. |
Example: Student(Roll_no, Name) |
Example: Dependent(Dep_name, Sex, Age) of Employee. |
Generalization, Specialization, Aggregation
-
Generalization: Bottom-up (lower entities → higher superclass). "Is-a".
-
Specialization: Top-down (superclass → lower subclasses). "Is-a".
-
Aggregation: Relationship as an entity (has its own relationships). "Has-a".
Example:
Enrollment(relationship) aggregated withCourseto modelOffers.
ER Diagram: Indian Movies (Past Paper Example)
[Movie]───(Shot_At)───[Location]
│
├──(Has_Actor)───[Actor]───(Works_In)───[Movie]
├──(Directed_By)───[Director]
├──(Produced_By)───[Producer]
└──(In_Language)───[Language]
-
Movie(Movie_ID, Title, Year) – Strong Entity. -
Location(Loc_ID, City, State) – Strong Entity. -
Actor(Actor_ID, Name, DOB) – Strong Entity. -
Relationships:
Shot_At(M:N),Has_Actor(M:N),Directed_By(M:1),In_Language(M:1).
Mapping ER to Relational Schema
| ER Construct | Relational Mapping |
|---|---|
| Strong Entity | Table with all simple/composite attributes; key attribute → primary key. |
| Weak Entity | Table with partial key + owner's primary key (foreign key). Primary key = (owner key + partial key). |
| 1:1 Relationship | Merge into one table OR add foreign key to either side (with UNIQUE constraint). |
| 1:M Relationship | Add foreign key on many side. |
| M:N Relationship | Create new table with foreign keys from both sides; composite primary key. |
| Composite Attribute | Flatten: separate columns for sub-attributes. |
| Multivalued Attribute | Separate table: (owner_key, attribute_value). |
| Generalization/Specialization | Table for superclass + tables for each subclass with same primary key (foreign key to superclass). |
| Total Participation | Foreign key in participating table cannot be NULL. |
III. Relational Model
Relational Schema & Instance
-
Schema:
R(A₁: D₁, A₂: D₂, ..., Aₙ: Dₙ)whereR= relation name,Aᵢ= attribute,Dᵢ= domain. -
Instance: Set of tuples (rows) at a given time.
r(R).
Types of Keys
| Key Type | Definition | Properties |
|---|---|---|
| Super Key | Set of attributes uniquely identifying a tuple. | May contain extra attributes. |
| Candidate Key | Minimal super key (no proper subset is a super key). | Unique, minimal. |
| Primary Key | Chosen candidate key. NOT NULL, UNIQUE. | Used for tuple identification. |
| Foreign Key | Attribute(s) in R referencing primary key of S. Enforces referential integrity. |
Can have NULL if allowed. |
| Composite Key | Primary key consisting of multiple attributes. | Example: (Roll_no, Course_ID) in Enrollment. |
Integrity Constraints
-
Domain Constraint: Attribute value must be from domain (type, range).
-
Entity Integrity:
PRIMARY KEYcannot beNULL. -
Referential Integrity: Foreign key value must:
-
Equal to a primary key value in referenced table, OR
-
Be
NULL(if allowed).
-
-
Assertions: General predicates (
CREATE ASSERTION). Example:CHECK (dept_count > 0).
Relational Algebra Operations
Basic Operators:
-
Selection (σ):
σ_{condition}(R)– Rows satisfying condition. -
Projection (Π):
Π_{A₁, A₂}(R)– Specific columns (duplicates removed). -
Set Operations:
∪,∩,−(require union-compatible). -
Cartesian Product (×):
R × S– Concatenates every row of R with every row of S. -
Rename (ρ):
ρ_{S(A₁,...,Aₙ)}(R)– Renames relation/attributes.
Join Operations:
-
Theta Join (⋈ₜₕ):
R ⋈ₜₕ S– Cartesian product + selection (σ_{R.A θ S.B}(R × S)). -
Equi Join: Theta join with
=only. -
Natural Join (⋈): Equi join on all common attributes + duplicate elimination.
-
Outer Joins:
-
Left Outer Join (⋈ₗ): All tuples from left,
NULLfor unmatched right. -
Right Outer Join (⋈ᵣ): All tuples from right,
NULLfor unmatched left. -
Full Outer Join (⋈ₓ): All tuples from both,
NULLwhere unmatched.
-
Additional Operators:
-
Division (÷):
R ÷ S– Tuples in R that are related to all tuples in S.-
Use: "Find students who have taken all courses."
-
Formula:
Π_{R-S}(R) − Π_{R-S}((Π_{R-S}(R) × S) − R).
-
Relational Calculus
-
Tuple Relational Calculus (TRC):
{ t | P(t) }– Set of tuplestsatisfying formulaP.- Example:
{ t | t ∈ Student ∧ t.Dept = 'CS' }.
- Example:
-
Domain Relational Calculus (DRC):
{ ⟨x₁,...,xₙ⟩ | P(x₁,...,xₙ) }– Set of domain tuples.- Example:
{ ⟨sname⟩ | ∃did (Student(sname, sid, did) ∧ Dept(did, 'CS')) }.
- Example:
Safe Expressions: Finite result set (use only from given relations).
SQL: DDL & DML
DDL:
CREATE TABLE Student(Roll_no INT PRIMARY KEY, Name VARCHAR(50), Dept VARCHAR(10));
ALTER TABLE Student ADD COLUMN Marks INT;
DROP TABLE Student;
DML:
SELECT * FROM Student WHERE Dept = 'CS'; -- Selection
SELECT DISTINCT Dept FROM Student; -- Projection
SELECT * FROM Student, Course WHERE Student.Dept = Course.Dept; -- Cartesian + Selection (Join)
Special Operators:
-
LIKE '%pattern%'– Pattern matching. -
ANY/ALL– Comparison with set. -
EXISTS– Subquery returns at least one row. -
IN– Value in set.
Aggregate Functions:
SELECT Dept, COUNT(*), AVG(Marks) FROM Student GROUP BY Dept HAVING AVG(Marks) > 75;
Subqueries: Nested SELECT in WHERE/FROM/SELECT.
Views
-
Definition: Virtual table from
SELECTquery.CREATE VIEW CS_Students AS SELECT * FROM Student WHERE Dept='CS';. -
Updatability: Simple views (single table, no aggregates, no
DISTINCT) are updatable. -
Advantages: Security (restrict columns/rows), simplify complex queries, logical data independence.
Triggers
-
Definition: Procedural code auto-executed on
INSERT/UPDATE/DELETE. -
Syntax (Oracle):
CREATE TRIGGER trig_name
BEFORE UPDATE ON Orders
FOR EACH ROW
BEGIN
INSERT INTO AuditLog VALUES (:OLD.OrderID, SYSDATE);
END;
Components: Event, Condition, Action.
IV. Database Design and Normalization
Functional Dependencies (FDs)
-
Definition:
X → Y(X functionally determines Y). For any two tuples, ifXvalues equal, thenYvalues equal. -
Armstrong's Inference Rules:
-
Reflexivity: If
Y ⊆ X, thenX → Y. -
Augmentation: If
X → Y, thenXZ → YZ. -
Transitivity: If
X → YandY → Z, thenX → Z.
- Derived Rules: Union (
X → Y, X → Z ⇒ X → YZ), Decomposition (X → YZ ⇒ X → Y, X → Z), Pseudotransitivity.
-
FD Closure (X⁺)
-
Set of attributes functionally determined by
Xusing FDs. -
Algorithm: Start
X⁺ = X. Repeatedly addYifX⁺ → Yin F. Until no change.
Candidate Keys from FD Set
-
Find attributes not on RHS of any FD → must be in every key.
-
Compute closure of these attributes.
-
If closure = all attributes, it's a candidate key.
-
Else, add minimal attributes from RHS to get closure = full set.
Normal Forms
| Normal Form | Condition | Example Violation |
|---|---|---|
| 1NF | Atomic (indivisible) attribute values. No repeating groups. | Phone_No = '123,456' |
| 2NF | 1NF + No partial dependency (non-key attr depends on part of composite key). | R(OrderID, Product, Qty, Price) with OrderID → Price. |
| 3NF | 2NF + No transitive dependency (non-key → non-key). | R(Student, Dept, Dept_Head) with Student → Dept → Dept_Head. |
| BCNF | 3NF + Every determinant is a candidate key. Stricter than 3NF. | R(Doctor, Patient, Disease) with Doctor → Disease but Doctor not a key. |
| 4NF | BCNF + No non-trivial MVD where MVD left side not a superkey. | R(Student, Course, Hobby) with Student →→ Course and Student →→ Hobby. |
Decomposition
-
Lossless Join Decomposition:
Rdecomposed intoR₁, R₂ifR₁ ⋈ R₂ = R.- Condition:
(R₁ ∩ R₂) → R₁OR(R₁ ∩ R₂) → R₂.
- Condition:
-
Dependency Preserving: Union of FDs from decomposed relations implies original FDs.
Goal: Decompose to BCNF/4NF losslessly and preserve dependencies if possible.
Normalization Process (Example)
Given R(A, B, C, D) with FDs: {A → B, B → C, C → D}.
-
1NF: Assume atomic.
-
2NF:
A → B(partial? if composite key). If key=A, then 2NF satisfied. -
3NF:
B → C(transitive: A→B→C). Decompose:R1(A, B),R2(B, C, D).
-
BCNF: In
R2,B → C, DbutBnot key. DecomposeR2:-
R21(B, C),R22(B, D). -
Final:
R1(A,B),R21(B,C),R22(B,D)– BCNF, lossless, not dependency preserving (lostC→D).
-
V. Transaction Management
Transaction & ACID Properties
-
Transaction: Logical unit of work (sequence of read/write operations).
-
ACID:
-
Atomicity: All or nothing.
COMMITorABORT. -
Consistency: Preserves integrity constraints.
-
Isolation: Concurrent transactions don't interfere.
-
Durability: Committed changes permanent (survive failures).
-
Transaction States
[Active] → [Partially Committed] → [Committed]
↓ ↓
[Failed] → [Aborted] → (Restart)
State Diagram: Active (executing) → Partially Committed (end transaction) → Committed (changes permanent). Any failure → Failed → Aborted (rollback).
Schedules
-
Serial Schedule: Transactions execute sequentially.
-
Non-Serial Schedule: Transactions interleave operations.
-
Conflict Serializable: Schedule equivalent to some serial schedule (no cycles in precedence graph).
-
View Serializable: Equivalent to serial schedule by view equivalence (same read-from, same final writes).
Serializability Testing (Precedence Graph)
-
Nodes = transactions.
-
Edge
Tᵢ → TⱼifTᵢwritesXandTⱼreadsX, orTᵢreads/writesXandTⱼwritesX. -
Conflict Serializable iff graph is acyclic.
Concurrency Control
Two-Phase Locking (2PL):
-
Growing Phase: Acquire locks, no release.
-
Shrinking Phase: Release locks, no acquire.
-
Guarantees: Conflict serializability.
-
Variants:
-
Strict 2PL: Hold exclusive locks until commit/abort.
-
Rigorous 2PL: Hold all locks until commit/abort (prevents cascading abort).
-
Timestamp-Based Concurrency Control:
-
Each transaction gets timestamp
TS(T). -
Read/Write Rules:
-
If
TS(T) < R-TS(X)→Ttoo old, abort. -
If
TS(T) < W-TS(X)→Ttoo old, abort. -
Else, read/write, update
R-TS(X)/W-TS(X).
-
-
Advantage: No deadlocks.
Optimistic Concurrency Control (Validation-Based):
-
Read Phase: Read, write to local copies.
-
Validation Phase: Check if
T's read set overlaps with write set of committedT'(withTS(T') < TS(T)).- If conflict, abort.
-
Write Phase: If validated, write to database.
Deadlock
-
Definition: Cycle of transactions waiting for locks held by each other.
-
Prevention: Order resources, pre-declare locks, no wait-die/wound-wait.
-
Detection: Wait-for graph cycle detection.
-
Resolution: Victim selection (abort youngest/lowest cost transaction).
Recovery
Database Logs:
-
Types:
-
Update Log:
(X, old, new)before/after image. -
Compensation Log (CL): For undo.
-
-
Importance: Atomicity, durability, recovery.
Recovery Techniques:
-
Deferred Database Modification: Write changes only at commit. Undo not needed; if abort, ignore local writes.
-
Immediate Database Modification: Write as soon as operation executes. Need undo (using old values) and redo (using new values).
Checkpoint:
-
Periodically force all modified buffers to disk, write checkpoint record to log.
-
Recovery from checkpoint: Only consider transactions active after last checkpoint.
Shadow Paging:
-
Maintain shadow copy of database pages.
-
Transaction writes to new pages; update page table at commit.
-
No undo log; abort = discard new pages.
-
No redo; commit = switch page table.
VI. Query Processing and Optimization
Phases of Query Processing
-
Parsing: Syntax/semantic check → parse tree.
-
Translation: Parse tree → relational algebra expression.
-
Optimization: Choose lowest-cost execution plan.
-
Execution: Generate code/interpret plan; fetch results.
Query Optimization Necessity
-
Relational algebra expressions are equivalent but have different costs.
-
Example:
σ_{A=5}(R ⋈ S)vsσ_{A=5}(R) ⋈ S– push selection before join to reduce intermediate size.
Cost Estimation Measures
-
I/O Cost: Number of disk page reads/writes (dominant factor).
-
CPU Cost: Tuple processing, comparison.
-
Network Cost: Distributed queries.
Cost Formula:
Total Cost = (I/O Cost × Disk Seek/Transfer Time) + (CPU Cost × CPU Time per Tuple).
Heuristic vs Cost-Based Optimization
-
Heuristic Rules:
-
Apply selection and projection early (reduce tuple/attribute count).
-
Perform most restrictive operations first.
-
Projection before Cartesian product.
-
-
Cost-Based: Enumerate equivalent expressions, estimate cost using statistics (cardinality, distinct values), choose minimum.
Complexity of Operations (Big O)
| Operation | Cost (Block Nested Loop Join) | Notes |
|---|---|---|
| Selection | O(N) | Full scan; index reduces to O(log N). |
| Projection | O(N) | Duplicate elimination: O(N log N). |
| Join | O(M×N) worst-case | Index nested loop: O(M log N). |
VII. Storage and Indexing
File Organization Methods
| Method | Description | Pros | Cons |
|---|---|---|---|
| Heap File | Unordered; new records appended. | Fast insert. | Slow search/scan (full scan). |
| Sorted File | Sorted on search key. | Fast range queries (binary search). | Slow insert (re-sort). |
| Hash File | Buckets via hash function on key. | Fast equality search (O(1)). | No range queries; collisions. |
Indexing Concepts
-
Primary Index: On primary key, clustered (data order = index order). One per table.
-
Clustering Index: On any key with data sorted on that key. Data order = index order.
-
Secondary Index: Non-clustered; data order ≠ index order. May have dense (entry per record) or sparse (entry per block).
Dense vs Sparse: Dense has entry for every record; sparse has entry for every data block.
B-trees vs B+ trees
| B-tree | B+ tree |
|---|---|
| Keys in internal + leaf nodes. | Keys only in leaf nodes; internal nodes have copies for routing. |
| Pointers in leaf nodes may point to records. | Leaf nodes linked sequentially (range queries fast). |
| Less efficient for range queries. | Standard for DBMS indexes. |
Hashing Techniques
-
Static Hashing: Fixed number of buckets.
bucket = h(key) mod N.- Problem: Bucket overflow (chaining/overflow pages); poor space utilization.
-
Extendable Hashing:
-
Directory of pointers to buckets.
-
Local depth (bucket), global depth (directory).
-
Split bucket when overflow; may double directory.
-
-
Linear Hashing:
-
No directory; split buckets in order.
-
Overflow chains; split when overflow.
-
Split pointer rounds.
-
Bitmap Indexing
-
For low-cardinality attributes (e.g., gender, status).
-
Bitmap: Bit vector per distinct value (1 = present, 0 = absent).
-
Operations:
AND,OR,NOT(bitwise) – fast.
Example:
Gender='M' ∧ Dept='CS'→ bitwiseANDof two bitmaps.
RAID Levels
| Level | Description | Use Case |
|---|---|---|
| 0 | Striping (no redundancy) | High performance, no fault tolerance. |
| 1 | Mirroring (duplicate disks) | High availability, read speed. |
| 5 | Striping + distributed parity | Balance performance, capacity, fault tolerance (1 disk fail). |
VIII. Distributed and Advanced Databases
Distributed Database Concepts
-
Fragmentation:
-
Horizontal: Subsets of tuples.
-
Vertical: Subsets of attributes.
-
Hybrid: Both.
-
-
Replication: Copy fragments at multiple sites.
-
Transparency:
-
Fragmentation Transparency: Users don't know data is fragmented.
-
Replication Transparency: Users don't know replicas.
-
Location Transparency: Users don't know site names.
-
Challenges in DDBMS
-
Data Distribution: Fragmentation, replication, consistency.
-
Concurrency Control: Distributed locking, timestamp (needs global ordering).
-
Recovery: Commit protocols (2-phase commit), distributed logging.
-
Heterogeneity: Different DBMS, OS, networks.
NoSQL Databases
| Type | Data Model | Example | Use Case |
|---|---|---|---|
| Document | JSON/BSON documents | MongoDB | Content management, catalogs. |
| Key-Value | Key → Value | Redis | Caching, sessions. |
| Column | Column families | Cassandra | Time-series, analytics. |
| Graph | Nodes + Edges | Neo4j | Social networks, recommendations. |
OODBMS vs RDBMS
| Feature | RDBMS | OODBMS |
|---|---|---|
| Data Model | Tables, rows, columns. | Objects, classes, inheritance. |
| Complex Data | Normalized, joins needed. | Direct object storage (no impedance mismatch). |
| Query Language | SQL (declarative). | OQL (object-oriented). |
| Performance | Good for complex joins. | Better for complex objects/relationships. |
| Use Case | Traditional business apps. | CAD, CAM, real-time systems. |
IX. Additional Topics (High-Frequency from Past Papers)
Data Dictionary & Dynamic Performance Views
-
Data Dictionary: System catalog storing metadata (tables, columns, constraints, users). Read-only.
-
Dynamic Performance Views (Oracle):
V$views (e.g.,V$SESSION,V$SQL) – real-time performance stats.
Assertions
-
Definition: General integrity constraints not tied to single table.
-
Syntax:
CREATE ASSERTION name CHECK (condition); -
Example:
CREATE ASSERTION dept_count CHECK (10 <= (SELECT COUNT(*) FROM Dept));
Rarely used; triggers often替代.
Hierarchical Queries (Oracle CONNECT BY)
SELECT employee_id, manager_id, LEVEL
FROM employees
START WITH manager_id IS NULL
CONNECT BY PRIOR employee_id = manager_id;
-
LEVEL: Pseudocolumn for depth. -
PRIOR: Specifies parent-child relationship.
Aggregation in ER Model
-
Aggregation: Relationship between an entity set and a relationship set (treats relationship as an entity).
-
Use: When a relationship needs to participate in another relationship.
Example:
Enrollment(relationship betweenStudentandCourse) participates inOffers(relationship withSemester).
Multiple Granularity Locking
-
Lock Modes:
IS(intent shared),IX(intent exclusive),S,X. -
Protocol:
-
To lock a node in
S/X, must haveIS/IXon parent. -
To lock child in
S/X, parent must beIS/IX.
-
-
Allows: Fine-grained locking without checking all descendants.
Validation-Based Protocols (Optimistic)
-
Phases: Read (collect reads/writes), Validate (check conflicts), Write (apply changes).
-
Validation Test: For
Tᵢstarting afterTⱼcommitted:-
Tᵢ's read set ∩Tⱼ's write set = ∅ AND -
Tᵢ's write set ∩ (Tⱼ's read ∪ write set) = ∅.
-
-
Cost: Low overhead, good for low conflict workloads.
Complexity Measures in Query Optimization
-
I/O Complexity: Number of block transfers.
-
CPU Complexity: Tuple comparisons, hash calculations.
-
Network Complexity: Data shipped in distributed queries.
Goal: Minimize total cost; I/O usually dominates.
BOXED KEY FORMULAS & THEOREMS
-
FD Closure Algorithm:
X⁺ ← X repeat for each FD Y → Z in F: if Y ⊆ X⁺ then X⁺ ← X⁺ ∪ Z until no change -
Lossless Join Condition:
$$(R_1 \cap R_2) \rightarrow R_1 \quad \text{OR} \quad (R_1 \cap R_2) \rightarrow R_2$$
- Division Operation:
$$R \div S = \Pi_{R-S}(R) - \Pi_{R-S}((\Pi_{R-S}(R) \times S) - R)$$
-
2PL Guarantee: If schedule follows 2PL, it is conflict serializable.
-
Timestamp Ordering:
-
Read:
TS(T) < R-TS(X)→ abort; else read. -
Write:
TS(T) < W-TS(X)→ abort; else write.
-
-
B+ tree Order:
-
Leaf Nodes:
⌊(n×F)/2⌋ ≤ keys ≤ n×F(F = fill factor). -
Internal Nodes:
⌈n/2⌉ ≤ pointers ≤ n.
-
[!TIP] Exam Focus Areas (Based on Past Papers):
- 7-mark questions: DBMS vs File Systems, ER Diagrams (University/Hospital/Indian Movies), Normalization (FDs, 2NF/3NF/BCNF), ACID & Transaction States, 2PL & Deadlock, Relational Algebra (Selection/Projection/Join), Serializability (Precedence Graph).
- Short Notes (5m): Assertions, Hierarchical Queries, MVD/4NF, Views, Triggers, RAID, Hashing (Extendable/Linear), OODBMS vs RDBMS, Distributed DB Challenges.
- SQL Queries: Always practice subqueries, joins, aggregate functions, GROUP BY/HAVING.
- Normalization: Be ready to identify FDs, find candidate keys, convert to 2NF/3NF/BCNF step-by-step.
- Concurrency: Draw state diagram, explain 2PL variants, solve conflict serializability with precedence graph.
- ER to Relational Mapping: Weak entities, M:N relationships, total participation – rules must be memorized.