CS-502 AD-402 AL-502
+1 moreIO-502
Database Management Systems

Database Management Systems Important Questions

RGPV · B.Tech · CSE · Semester 5 · Current scheme · 9 papers (2020 to 2025)

  1. Read the answers

    Start with the topics that come every year.

  2. Revise unit notes

    Go through each unit once to score more.

Paperwala Imp Topics - Database Management Systems important questions

Download Paperwala Imp Question & Answer (PDF)

Counted from the questions in the past papers listed on this site. Repeated = how many times the topic came in those papers.

Database Management Systems important questions with answers

Each answer starts with the short answer. Then come the points to write, a diagram and an exam tip. The questions under each topic are copied from the RGPV papers.

Q1. Keys and integrity constraints

Asked 15 times in 2020, 2022, 2023, 2024, 2025 · Unit 2

From the papers

  • “Discuss the importance of integrity and referential integrity constraints.” (2024, 2025)
  • “Explain relational data model concepts: relations, attributes, tuples, domains and keys.” (2025)
  • “What is relational model? Distinguish super key, candidate key and primary key with examples.” (2025)

The short answer

A key is a set of attributes that picks out exactly one tuple of a relation. Integrity constraints are rules every row must follow, so wrong data cannot get into the database.

Write these points

  1. Relation terms: a relation is a table, a tuple is a row and an attribute is a column.
  2. A domain is the set of values a column may take.
  3. Super key: any set of attributes whose values never repeat in two rows. {E_ID} and {E_ID, Name} are both super keys.
  4. Candidate key: a minimal super key. Remove any attribute from it and it stops being unique.
  5. Primary key: the candidate key the designer picks. It cannot be NULL. The other candidate keys are alternate keys.
  6. Foreign key: a column in one table that refers to the primary key of another table, like Dept_ID in EMPLOYEE.
  7. Domain constraint: each value must come from its column's domain, for example Age INT CHECK (Age > 0).
  8. Entity integrity: no part of a primary key can be NULL. Referential integrity: a foreign key value must match a primary key value in the parent table or be NULL.

Example.

CREATE TABLE Employee (E_ID INT PRIMARY KEY, Name VARCHAR(30) NOT NULL, Dept_ID INT REFERENCES Department(Dept_ID) ON DELETE CASCADE); Now deleting department 101 also deletes every employee of 101. With ON DELETE SET NULL their Dept_ID would become NULL instead. Without either option the DBMS rejects the delete.

Real-life example

Your Aadhaar number picks out exactly one person in the country. In a database table it would be the primary key. A bank will not let an account point to a customer ID that does not exist. That is a foreign key rule.

Foreign key Dept_ID points to the primary key of DEPARTMENT. Every primary key is a candidate key. Every candidate key is a super key.
Foreign key Dept_ID points to the primary key of DEPARTMENT. Every primary key is a candidate key. Every candidate key is a super key.

Same or opposite: primary key and foreign key

PointPrimary keyForeign keySame or opposite
PurposeIdentifies each rowLinks to another tableOpposite
NULL allowedNoYes, unless statedOpposite
Duplicates allowedNoYesOpposite
Is an integrity constraintYesYesSame

Exam tip. Draw two small tables and show the foreign key with an arrow to the primary key. A candidate key must be minimal. A super key does not have to be. Primary key means unique plus NOT NULL.

Back to the topic list

Q2. Normalization: 1NF, 2NF, 3NF and BCNF

Asked 14 times in 2020, 2022, 2023, 2024, 2025 · Unit 3

From the papers

  • “Explain Boyce Codd normal form with an example.” (2022, 2024)
  • “Explain normalization and functional dependency. Discuss first, second and third normal forms.” (2025)
  • “Normalize R(A,B,C,D) with A->B, B->C, C->D.” (2025)

The short answer

Normalization is splitting a relation step by step into smaller relations so that redundancy goes away along with the insert, update and delete anomalies. Each normal form is a test the relation must pass.

Write these points

  1. Why we need it: redundant data gives three anomalies.
  2. Insert anomaly: a department with no employee cannot be added.
  3. Delete anomaly: deleting the last employee loses the department.
  4. Update anomaly: one change must be made in many rows.
  5. 1NF: every attribute holds one atomic value. No lists or repeating groups in a cell.
  6. 2NF: in 1NF with no non-prime attribute depending on only part of a candidate key (no partial dependency). It only matters when the key has two or more attributes.
  7. 3NF: in 2NF with no non-prime attribute depending on another non-prime attribute (no transitive dependency). Test: for every FD X -> A, X is a super key or A is a prime attribute.
  8. BCNF: for every non-trivial FD X -> A, X must be a super key. Every BCNF relation is in 3NF. A 3NF relation may fail BCNF when a prime attribute depends on a non-key.
  9. Each split must be lossless. A 3NF split can always keep every dependency. A BCNF split sometimes cannot.

Steps

  1. Question (2025): normalize R(A, B, C, D) with A -> B, B -> C, C -> D.
  2. Find the key: A+ = {A, B, C, D}, so A is the only candidate key.
  3. 2NF: the key has one attribute, so a partial dependency is not possible. R is in 2NF.
  4. 3NF: A -> B -> C -> D is a transitive chain, so R is not in 3NF.
  5. Split on each FD: R1(A, B), R2(B, C), R3(C, D) with keys A, B and C.
  6. In every new table the left side of its FD is the key, so all three are in BCNF. The shared columns B and C are keys, so the join is lossless.

One table taken to BCNF.

Table (Roll, Course, Name, Teacher, Room) with key (Roll, Course). FDs: Roll → Name, Course → Teacher, Teacher → Room.

2NF: Name depends on Roll alone while Teacher depends on Course alone. Split into Student(Roll, Name), Enroll(Roll, Course) and CourseT(Course, Teacher, Room).

3NF: Course → Teacher → Room is transitive. Split CourseT into Course(Course, Teacher) and Teacher(Teacher, Room).

Result: 4 tables, each in BCNF because every determinant is a key. A change of room is now made in one row.

Real-life example

A college that stores the HOD's phone number in every student row must change hundreds of rows when the number changes. Normalization moves that number to one department table, so it is stored once.

The STUDENT example from the 2025 paper, taken from 1NF to BCNF.
The STUDENT example from the 2025 paper, taken from 1NF to BCNF.

Same or opposite: 3NF and BCNF

Point3NFBCNFSame or opposite
Rule for X → AX is a superkey or A is primeX is a superkeyOpposite
StrictnessLess strictStricterOpposite
Dependency preserving splitAlways possibleNot alwaysOpposite
Removes most redundancyYesYesSame

Exam tip. Find the candidate key first. Then test 2NF, 3NF and BCNF one by one. Give the reason with each answer, for example: not in 2NF because Course -> Instructor is a partial dependency. BCNF in one line: every determinant is a super key.

Back to the topic list

Q3. DBMS architecture, three levels and data independence

Asked 14 times in 2020, 2022, 2023, 2024, 2025 · Unit 1

From the papers

  • “Explain data models, schemas and instances. What is data independence?” (2025)
  • “What is schema? Explain the overall database structure with a suitable example.” (2025)
  • “Explain the levels of database architecture. Describe the three-schema architecture and how it supports data independence.” (2025)

The short answer

The three-level (ANSI/SPARC) architecture keeps apart how users see the data, what data is stored and how it is stored on disk. Data independence means we can change the schema at one level without changing the level above it.

Write these points

  1. External level (view level): each user or program sees only the part of the data it needs. A student sees his own marks, the accounts office sees fees.
  2. Conceptual level (logical level): one schema for the whole database with all tables, attributes, relationships and constraints. It has no storage details.
  3. Internal level (physical level): how records sit on disk, with files, indexes, block sizes and access paths.
  4. Two mappings join the levels: external/conceptual and conceptual/internal. The DBMS uses them to turn a user request into disk operations.
  5. Logical data independence: change the conceptual schema (add a column or a table) without changing views or programs. It is harder to get.
  6. Physical data independence: change the internal schema (add an index, move files) without changing the conceptual schema.
  7. Who uses each level: end users and programs see the external level, the DBA and designers work at the conceptual level, the DBMS itself handles the internal level.
  8. Schema and instance: the schema is the design and rarely changes. The instance is the data present at one moment and changes all the time.
  9. Parts of a DBMS: the query processor (DDL interpreter, DML compiler, evaluation engine).
  10. The storage manager (buffer, file, transaction and authorization managers).
  11. Disk storage (data files, data dictionary, indexes).

Data independence before and after.

External view for the result app: Result = SELECT Roll, Marks FROM Student.

Physical change: add an index on Marks and move the file to an SSD. The conceptual schema does not change, so no query changes.

Logical change: add a column Email to Student. The view Result still has Roll and Marks, so the result app keeps working.

Only the mapping between the levels is updated, never the application code.

Real-life example

A bank can move its data to faster disks without changing the mobile app. That is physical data independence. The app keeps working because it sees only its external view.

Three-level architecture. Each mapping is where one kind of data independence comes from.
Three-level architecture. Each mapping is where one kind of data independence comes from.

Same or opposite: logical and physical data independence

PointLogicalPhysicalSame or opposite
Change allowed inConceptual schemaInternal schemaOpposite
ExampleAdd a columnMove to new disks, add an indexOpposite
DifficultyHarderEasierOpposite
Apps keep workingYesYesSame

Exam tip. Draw the three levels with both mappings. The diagram carries most of the marks. Logical independence sits between external and conceptual. Physical independence sits between conceptual and internal.

Back to the topic list

Q4. Relational algebra and join operations

Asked 14 times in 2022, 2023, 2024, 2025 · Unit 2

From the papers

  • “Explain fundamental operations in relational algebra with examples.” (2023, 2025)
  • “Discuss in detail the operators SELECT, PROJECT and UNION with suitable examples.” (2022, 2024)
  • “Discuss the relational algebra operations SELECT, PROJECT, DIVISION with examples.” (2022, 2024)

The short answer

Relational algebra is a procedural query language. Each operation takes one or two relations as input and gives a new relation as output, so operations can be nested.

Write these points

  1. Select (sigma): keeps the rows that meet a condition. sigma Salary > 5000 (Employee).
  2. Project (pi): keeps the named columns and removes duplicate rows. pi Name, Salary (Employee).
  3. Union, intersection and set difference need union compatible relations: the same number of attributes with matching domains.
  4. Cartesian product (R x S): pairs every row of R with every row of S. If R has m rows and S has n rows, the result has m times n rows.
  5. Rename (rho) gives a new name to a relation or attribute. Select, project, union, set difference, product and rename are the six fundamental operations.
  6. Joins: a theta join keeps product rows that meet any condition. An equi join uses only = conditions and keeps both columns. A natural join matches on all common attributes and keeps one copy.
  7. Outer joins also keep unmatched rows and fill the gaps with NULL: left, right and full outer join.
  8. Division (R / S): gives the values in R that are paired with every value in S, such as students who took all the courses.

Example.

EMP(Eid, Dept) and DEPT(Dept, Dname), employees working in Sales (2025): pi Eid (sigma Dname = 'Sales' (EMP natural join DEPT)). EMP has no name column, so we project Eid. Select first, then join, because a smaller DEPT makes the join cheaper.

Real-life example

When a shopping site shows your orders with product names, it joins the Orders table with the Products table on product ID. That is a natural join done for you behind the screen.

The 2022 question worked out: R natural join S, then the result joined with T.
The 2022 question worked out: R natural join S, then the result joined with T.

Same or opposite: natural join and outer join

PointNatural joinLeft outer joinSame or opposite
Rows without a matchDroppedKept, with NULLsOpposite
Common columnsShown onceShown onceSame
Symbol⋈⟕Opposite
Combines two relationsYesYesSame

Exam tip. For each operation write its symbol, its general form and a two or three row example. A natural join keeps the common column once. An equi join keeps it twice. Project removes duplicate rows. SQL SELECT keeps them unless you write DISTINCT.

Back to the topic list

Q5. ER model, ER diagram and conversion to tables

Asked 12 times in 2020, 2022, 2023, 2024, 2025 · Unit 1

From the papers

  • “Describe the ER data model. Explain entities, attributes and relationships with examples.” (2025)
  • “Draw an ER diagram for a library system and transform it into relational tables.” (2025)
  • “What is ER diagram? Explain its components and notation. Draw an ER diagram for an Employee Project Management System.” (2025)

The short answer

The ER (entity relationship) model describes data as entities, their attributes and the relationships between them. An ER diagram draws this design before any table is made.

Write these points

  1. Entity: a real-world object such as an employee. A strong entity has its own key. A weak entity (CHILD) has only a partial key and is identified through its owner entity.
  2. Attributes: simple or composite (Name = first + last), single valued or multivalued (many phone numbers), stored or derived (age from date of birth). The key attribute is underlined.
  3. Relationship: an association between entities, like WORKS_IN. Cardinality is 1:1, 1:N or M:N. Participation is total (double line) or partial (single line).
  4. Symbols: rectangle for an entity, double rectangle for a weak entity, diamond for a relationship, double diamond for an identifying relationship.
  5. Ellipse for an attribute, double ellipse for multivalued, dashed ellipse for derived.
  6. Weak to strong: give the weak entity a key of its own (say Child_ID). Or carry the owner's key into it so the combined key is unique.

Steps

  1. Each strong entity becomes a table with its key as the primary key: EMPLOYEE(ssn, salary, phone), DEPARTMENT(dno, dname, budget).
  2. A weak entity becomes a table with the owner's key plus its partial key: CHILD(ssn, name, age). Make ssn a foreign key with ON DELETE CASCADE, so a child's row goes when the parent leaves.
  3. A 1:N relationship puts the key of the 1 side into the N side table: MANAGES adds mgr_ssn to DEPARTMENT.
  4. An M:N relationship becomes its own table holding both keys: WORKS_IN(ssn, dno).
  5. A multivalued attribute gets a separate table, for example EMP_PHONE(ssn, phone).

An ER diagram turned into tables.

Entities Student(Roll, Name) and Course(CID, Title). M:N relationship Enrolls with the attribute Grade.

Tables: Student(Roll PK, Name), Course(CID PK, Title), Enrolls(Roll FK, CID FK, Grade) with key (Roll, CID).

A 1:N link such as Dept has Employees needs no extra table. DeptID goes into Employee as a foreign key.

A multivalued attribute Phone gets its own table StudentPhone(Roll, Phone). So the design gives 4 tables for students and courses.

Real-life example

Before a hospital system is built, the designers draw patients, doctors and appointments as boxes and diamonds. That ER diagram then becomes the actual tables.

ER diagram for the 2023 company question. CHILD is weak and depends on EMPLOYEE.
ER diagram for the 2023 company question. CHILD is weak and depends on EMPLOYEE.

Same or opposite: strong and weak entity

PointStrong entityWeak entitySame or opposite
Own primary keyYesNo, uses a partial keyOpposite
SymbolSingle rectangleDouble rectangleOpposite
Depends on another entityNoYesOpposite
Becomes a tableYesYesSame

Exam tip. Underline keys. Use a dashed underline for the partial key of a weak entity. Write the cardinality (1, N, M) on every relationship line.

Back to the topic list

Q6. SQL commands (DDL, DML, DCL, TCL) and queries

Asked 12 times in 2020, 2022, 2023, 2025 · Unit 2

From the papers

  • “SQL: create table STUDENT(RollNo, Name, Marks), insert two records, retrieve students with Marks > 60.” (2025)
  • “Write SQL queries to show an equi-join, an outer join and a nested query using EXISTS.” (2025)
  • “Explain DDL and embedded SQL with examples.” (2025)

The short answer

SQL is the standard language of relational databases. Its commands fall into four groups: DDL defines structure, DML works on the data, DCL controls access and TCL controls transactions.

Write these points

  1. DDL: CREATE, ALTER, DROP, TRUNCATE, RENAME. Example: ALTER TABLE Student ADD Email VARCHAR(40);
  2. DML: SELECT, INSERT, UPDATE, DELETE. Example: UPDATE Student SET Marks = 65 WHERE RollNo = 2;
  3. DCL: GRANT, REVOKE. Example: GRANT SELECT ON Student TO clerk; TCL: COMMIT, ROLLBACK, SAVEPOINT. Example: ROLLBACK TO sp1;
  4. Queries on the 2023 table Employee(E_ID, E_Name, Gender, Salary, Manager_ID, Dept_ID):
  5. Departments with average salary above 4000: SELECT Dept_ID FROM Employee GROUP BY Dept_ID HAVING AVG(Salary) > 4000; (gives 101)
  6. Same for male employees above 2000: SELECT Dept_ID FROM Employee WHERE Gender = 'M' GROUP BY Dept_ID HAVING AVG(Salary) > 2000; (gives 101 and 102)
  7. Second highest salary: SELECT E_Name, Salary, Dept_ID FROM Employee WHERE Salary = (SELECT MAX(Salary) FROM Employee WHERE Salary < (SELECT MAX(Salary) FROM Employee)); (gives B, 5000, 101)
  8. Salary above employee F: SELECT E_ID, E_Name FROM Employee WHERE Salary > (SELECT Salary FROM Employee WHERE E_Name = 'F');
  9. Higher than anyone in Dept 102: ... WHERE Salary > ANY (SELECT Salary FROM Employee WHERE Dept_ID = 102); For higher than all in Dept 103 write > ALL. > ANY beats the smallest value. > ALL beats the largest.
  10. WHERE filters rows before grouping. HAVING filters groups after GROUP BY. ORDER BY sorts the result.

Example.

2025 question: CREATE TABLE Student (RollNo INT PRIMARY KEY, Name VARCHAR(30), Marks INT);

INSERT INTO Student VALUES (1, 'Asha', 72); INSERT INTO Student VALUES (2, 'Ravi', 55);

SELECT * FROM Student WHERE Marks > 60; returns only Asha.

Real-life example

A college portal uses CREATE TABLE once when it is built. It runs INSERT for each admission and SELECT for every result page. It gives teachers GRANT rights and uses COMMIT when fees are paid.

Figure: groups of SQL commands
Figure: groups of SQL commands

Same or opposite: DDL and DML

PointDDLDMLSame or opposite
Works onStructureData in rowsOpposite
CommandsCREATE, ALTER, DROPINSERT, UPDATE, DELETEOpposite
Auto commitYesNo, needs COMMITOpposite
Part of SQLYesYesSame

Exam tip. A condition on SUM, AVG, COUNT, MAX or MIN goes in HAVING, never in WHERE. DELETE is DML and can be rolled back. TRUNCATE and DROP are DDL and commit at once in Oracle. End each statement with a semicolon and write the keywords in capitals.

Back to the topic list

Q7. Two-phase locking and its variants

Asked 10 times in 2020, 2022, 2023, 2024, 2025 · Unit 4

From the papers

  • “Explain concurrency control techniques: locking and time-stamping protocols.” (2025)
  • “What is locking protocol? Describe the strict two-phase locking protocol.” (2025)
  • “Explain concurrency control: shared locks, exclusive locks and two-phase locking.” (2025)

The short answer

Two-phase locking (2PL) is a locking protocol with two phases: a transaction takes locks in the growing phase, then gives them up in the shrinking phase. After it releases any lock it may not take a new one.

Write these points

  1. Lock modes: a shared lock S(A) lets a transaction read A. An exclusive lock X(A) lets it read and write A. A request for S is granted while others hold only S. Any request that involves X must wait.
  2. Growing phase: the transaction may get locks but may not release any.
  3. Shrinking phase: it may release locks but may not get new ones. The moment it gets its last lock is its lock point.
  4. 2PL guarantees conflict serializability. The serial order is the order of the lock points.
  5. Basic 2PL can still allow cascading rollback (a transaction reads a value that is later rolled back) and deadlock.
  6. Strict 2PL holds every exclusive lock until commit or abort, which stops cascading rollback. Rigorous 2PL holds every lock, shared too, until commit, so transactions serialize in commit order.
  7. Conservative 2PL takes all locks before the transaction starts. It never deadlocks, but the read and write sets must be known in advance.

Example.

T1: lock-X(A), read(A), A = A - 50, write(A), lock-X(B), read(B), B = B + 50, write(B), unlock(A), unlock(B), commit. This is basic 2PL with its lock point at lock-X(B). For strict or rigorous 2PL move both unlocks after the commit. Here T1 holds only X locks, so strict and rigorous look the same.

Real-life example

Two people book the last train seat at the same moment on IRCTC. Locking makes one wait until the other finishes. So the seat is not sold twice.

Locks held over time. In strict and rigorous 2PL the release happens at commit.
Locks held over time. In strict and rigorous 2PL the release happens at commit.

Same or opposite: basic 2PL and strict 2PL

PointBasic 2PLStrict 2PLSame or opposite
Exclusive locks releasedIn the shrinking phaseOnly at commit or abortOpposite
Cascading rollbackPossibleNot possibleOpposite
Gives serializable schedulesYesYesSame
Deadlock possibleYesYesSame

Exam tip. Draw the growing and shrinking curve and mark the lock point. 2PL ensures serializability. It does not prevent deadlock. Strict keeps X locks until commit. Rigorous keeps all locks until commit.

Back to the topic list

Q8. Serializability and the precedence graph test

Asked 10 times in 2020, 2022, 2023, 2025 · Unit 4

From the papers

  • “Explain transaction processing and serializability. Differentiate conflict and view serializability.” (2025)
  • “Is the schedule R1(X), W1(X), R2(X), W2(X), R1(Y), W1(Y) conflict serializable?” (2025)
  • “What is serializability? Explain testing of serializability, conflict and view serializable schedules.” (2025)

The short answer

A schedule is the order in which the operations of concurrent transactions run. A schedule is serializable if its result is the same as that of some serial schedule, where the transactions run one after another.

Write these points

  1. Two operations conflict when they belong to different transactions, use the same data item and at least one of them is a write (R-W, W-R or W-W).
  2. Conflict serializable: we can turn the schedule into a serial one by swapping adjacent operations that do not conflict.
  3. View serializable: each read reads from the same write as in some serial schedule. The final write of each item is also made by the same transaction.
  4. Every conflict serializable schedule is view serializable. A view serializable schedule with blind writes may not be conflict serializable.
  5. Testing view serializability is NP-complete, so real systems test conflict serializability.

Steps

  1. Draw one node for each transaction.
  2. For every conflicting pair where Ti's operation comes before Tj's, draw an edge Ti -> Tj.
  3. A cycle means the schedule is not conflict serializable.
  4. No cycle means it is. A topological order of the graph gives the equal serial schedule.

Example.

R1(X), W1(X), R2(X), W2(X), R1(Y), W1(Y) (2025): every conflict is on X with T1 first, so the only edge is T1 -> T2.

It is conflict serializable and equals T1 then T2.

In T1:R(A), T2:R(A), T1:W(A), T2:W(A), T1:R(B), T2:W(B) (IS-502 2025) we get T2 -> T1 from R2(A), W1(A).

We also get T1 -> T2 from W1(A), W2(A). That is a cycle, so it is not conflict serializable.

It is not view serializable either. In T1 then T2, T2 would read A written by T1. In T2 then T1, the final write of A would be by T1.

Real-life example

Many students pay fees at once on a portal. The database runs their steps mixed together for speed. Serializability makes sure the final balances are the same as if they paid one by one.

Two schedules from the 2025 papers. The right one has a cycle.
Two schedules from the 2025 papers. The right one has a cycle.

Same or opposite: conflict and view serializability

PointConflictViewSame or opposite
TestPrecedence graph has no cycleSame reads and final writesOpposite
Difficulty to testEasy, polynomialHard, NP-completeOpposite
Which set is largerSmaller setLarger, holds every conflict serializable scheduleOpposite
Means equal to a serial scheduleYesYesSame

Exam tip. Label every edge with the pair of operations that caused it. If there is no cycle, also write the serial order.

Back to the topic list

Q9. Log-based recovery, checkpoints and ARIES

Asked 9 times in 2020, 2022, 2023, 2024, 2025 · Unit 4

From the papers

  • “Explain log-based recovery and checkpoints with an example.” (2025)
  • “Discuss recovery from transaction failures. Explain log-based recovery and the role of checkpoints.” (2025)
  • “What is transaction? Discuss transaction recovery techniques.” (2024)

The short answer

The log is a file on stable storage that records every change a transaction makes before the change reaches the database. After a failure the DBMS reads the log to redo committed work and undo unfinished work.

Write these points

  1. Log records: <Ti start>, <Ti, X, old value, new value>, <Ti commit>, <Ti abort>.
  2. Write-ahead logging: the log record must be on stable storage before the changed data page is written to disk.
  3. Deferred update: changes reach the database only after commit, so recovery needs redo only.
  4. Immediate update: changes may reach the database before commit, so recovery needs undo (old values) and redo (new values).
  5. Redo Ti if the log has <Ti start> and <Ti commit>. Undo Ti if it has <Ti start> with no commit or abort.
  6. Checkpoint: the DBMS forces the log and the changed pages to disk and writes <checkpoint L>, with L the list of active transactions. Recovery then reads only the log after the last checkpoint.
  7. ARIES uses three passes. Analysis finds the dirty pages and the active transactions. Redo repeats history forward from the oldest needed record. Undo rolls back the unfinished transactions backward and writes compensation log records.

Example.

Log: <T1 start>, <T1, A, 1000, 950>, <T1, B, 2000, 2050>, <T1 commit>, <T2 start>, <T2, C, 700, 600>, then a crash. Redo T1, so A = 950 and B = 2050. Undo T2, so C goes back to 700.

Real-life example

If the power fails while an ATM is updating your balance, the bank uses its log after restart. It redoes the finished transfers and undoes the half-done one. Your money stays correct.

Five transactions around one checkpoint and a crash.
Five transactions around one checkpoint and a crash.

Same or opposite: deferred and immediate update

PointDeferred updateImmediate updateSame or opposite
Writes to the databaseAfter commitBefore commitOpposite
Undo neededNoYesOpposite
Redo neededYesYesSame
Uses a logYesYesSame

Exam tip. Undo uses old values. Redo uses new values. Undo goes backward through the log. Redo goes forward. From the checkpoint picture, list which transactions are redone and which are undone.

Back to the topic list

Q10. Functional dependency: closure, keys, minimal cover

Asked 9 times in 2020, 2022, 2023, 2024 · Unit 3

From the papers

  • “Candidate keys and highest normal form of R(ABCDEF) with A->BC, C->E, E->F, F->AB.” (2022, 2023)
  • “What is functional dependency? Describe the properties of FDs.” (2024)
  • “Compute the minimal (canonical) cover of R(WXYZ) with X->W, WZ->XY, Y->WXZ.” (2023)

The short answer

In a relation R, X -> Y (X functionally determines Y) means any two tuples that agree on X also agree on Y. FDs are how we find keys and decide normal forms.

Write these points

  1. Trivial FD: Y is a subset of X, as in AB -> A. Every other FD is non-trivial.
  2. Armstrong's axioms, which are sound and complete. Reflexivity: if Y is a subset of X then X -> Y.
  3. Augmentation: X -> Y gives XZ -> YZ. Transitivity: X -> Y with Y -> Z gives X -> Z.
  4. Derived rules: union (X -> Y with X -> Z gives X -> YZ) and decomposition (X -> YZ gives X -> Y).
  5. Pseudo-transitivity: X -> Y with WY -> Z gives WX -> Z.
  6. Closure X+: every attribute that X determines. If X+ holds all of R, X is a super key. If no smaller part of X does the same, X is a candidate key.
  7. An attribute that never appears on a right side must be in every key. Start the key search with those.
  8. Minimal (canonical) cover: an equal set of FDs with one attribute on each right side, no extra attribute on any left side and no redundant FD.

Steps

  1. Minimal cover of X -> W, WZ -> XY, Y -> WXZ (2023). Split the right sides: X -> W, WZ -> X, WZ -> Y, Y -> W, Y -> X, Y -> Z.
  2. Left sides: W+ = {W} and Z+ = {Z}, so neither W nor Z alone gives X or Y. Nothing is extra.
  3. Redundant FDs: Y -> W follows from Y -> X and X -> W, so drop it. WZ -> X follows from WZ -> Y and Y -> X, so drop it.
  4. Each of X -> W, WZ -> Y, Y -> X, Y -> Z is needed. Answer: X -> W, WZ -> Y, Y -> XZ.

Example.

R(ABCDEF) with A -> BC, C -> E, E -> F, F -> AB (2023). D is on no right side, so every key has D. AD+, CD+, DE+ and DF+ are all of R, so the candidate keys are AD, CD, DE and DF. B is the only non-prime attribute and A -> B makes it depend on part of the key AD. So R is only in 1NF.

Real-life example

In a college table, roll number decides the student's name. Roll number → name is a functional dependency. Knowing such rules tells you which column can be the key.

Closure of B for the 2020 question. B alone gives every attribute.
Closure of B for the 2020 question. B alone gives every attribute.

Same or opposite: closure of attributes and minimal cover

PointAttribute closure X⁺Minimal coverSame or opposite
GivesAll attributes X decidesSmallest equal set of FDsOpposite
Used forFinding keysDesigning 3NF tablesOpposite
Uses Armstrong's rulesYesYesSame
Changes the set of FDsNoYes, removes extrasOpposite

Exam tip. Write each closure step with the FD you used. To find the highest normal form, list the keys and the prime attributes first.

Back to the topic list

Q11. Triggers and assertions

Asked 8 times in 2020, 2022, 2023, 2024, 2025 · Unit 2

From the papers

  • “Explain triggers and assertions in SQL and their role in database integrity.” (2025)
  • “Explain briefly: triggers.” (2024)
  • “What is a trigger? Explain in detail with an example.” (2022)

The short answer

A trigger is a stored PL/SQL block that the DBMS runs by itself when a given event (INSERT, UPDATE or DELETE) happens on a table. An assertion is a condition on the database that must always stay true.

Write these points

  1. A trigger has three parts: the event, an optional condition (WHEN clause) and the action.
  2. Timing: BEFORE or AFTER the event. An INSTEAD OF trigger is written on a view so that the view can be updated.
  3. Row-level triggers (FOR EACH ROW) run once per changed row and can read :OLD and :NEW. Statement-level triggers run once per statement.
  4. Uses: audit trails, checks too complex for CHECK, keeping derived columns up to date and blocking wrong changes.
  5. Mutating table error: a row-level trigger may not query or change the table it fires on. A statement-level or compound trigger avoids it.
  6. Assertion syntax: CREATE ASSERTION name CHECK (condition). It is standard SQL, but Oracle and MySQL do not support it, so triggers do the job there.

Steps

  1. CREATE OR REPLACE TRIGGER trg_salary_check
  2. BEFORE INSERT OR UPDATE OF Salary ON Employee
  3. FOR EACH ROW
  4. BEGIN
  5. IF :NEW.Salary < 0 THEN RAISE_APPLICATION_ERROR(-20001, 'Salary cannot be negative'); END IF;
  6. END;

Example.

Assertion with the same rule: CREATE ASSERTION salary_ok CHECK (NOT EXISTS (SELECT * FROM Employee WHERE Salary < 0));

Real-life example

When stock of an item drops below 10, a shop's database can add a reorder row by itself. A trigger on the stock table does this without any person running a query.

Event, condition, action: the order in which a trigger fires.
Event, condition, action: the order in which a trigger fires.

Same or opposite: trigger and assertion

PointTriggerAssertionSame or opposite
ActionRuns code on an eventOnly checks a conditionOpposite
ScopeOne table eventWhole databaseOpposite
Support in Oracle and MySQLYesNoOpposite
Keeps data correctYesYesSame

Exam tip. A trigger runs by itself on its event. A procedure runs only when it is called. Write one full trigger with BEFORE or AFTER, the table name and FOR EACH ROW.

Back to the topic list

Q12. Query optimization: steps, heuristic and cost based

Asked 8 times in 2020, 2022, 2023, 2024, 2025 · Unit 3

From the papers

  • “Explain query optimization and its importance. Describe heuristic and cost-based optimization.” (2025)
  • “Give a brief note on query optimization.” (2024)
  • “Define optimization. Discuss the steps involved in query optimization.” (2024)

The short answer

Query optimization picks the cheapest of the many equal ways (execution plans) to run a query. The user says what data is wanted, while the optimizer decides how to get it.

Write these points

  1. Step 1, parsing and translation: check the syntax and the names, then turn the SQL into a relational algebra expression (a query tree).
  2. Step 2, optimization: build equal expressions with transformation rules and choose the plan with the lowest estimated cost.
  3. Step 3, evaluation: the query evaluation engine runs the chosen plan and returns the result.
  4. Heuristic rules: do selections and projections as early as possible.
  5. Turn a product followed by a selection into a join. Run the most selective selections and joins first.
  6. Sigma cascade: sigma (c1 AND c2) (R) = sigma c1 (sigma c2 (R)). It splits one selection so each part can be pushed down the tree.
  7. Cost based: estimate each plan's cost from catalog statistics (number of tuples, blocks, distinct values, index height) and pick the cheapest.
  8. Cost components: disk access (the largest), CPU time, memory buffers, storage of temporary results and network cost in a distributed database.
  9. Algorithms: selection by linear scan, binary search or an index. Join by nested loop, block nested loop, indexed nested loop, sort-merge or hash join.

Example.

SELECT E.Name FROM Emp E, Dept D WHERE E.Dept_ID = D.Dept_ID AND D.Dname = 'Sales'; A poor plan forms the full product of Emp and Dept, then selects. A good plan first selects Dname = 'Sales' from Dept (one row), joins that row with Emp, then projects Name.

Real-life example

A map app finds the fastest route among many roads to the same place. A query optimizer does the same for a query. It picks the cheapest of many plans that give the same rows.

How a query moves from SQL text to the result.
How a query moves from SQL text to the result.

Same or opposite: heuristic and cost based optimization

PointHeuristicCost basedSame or opposite
MethodFixed rulesEstimates the cost of plansOpposite
Example ruleDo selection earlyChoose the join order with least I/OOpposite
Needs statisticsNoYesOpposite
Gives the same result rowsYesYesSame

Exam tip. Name the three steps and draw the block diagram. Disk access is the main cost the optimizer tries to cut.

Back to the topic list

Q13. Indexing, B+ tree, hashing and file organization

Asked 8 times in 2020, 2022, 2023, 2024, 2025 · Unit 2

From the papers

  • “Explain indexing in relational databases and the types of indexes.” (2025)
  • “State and explain various file organization methods.” (2023)
  • “Discuss in detail about Primary file organization.” (2020)

The short answer

An index is a separate structure of search key values with pointers to records, so the DBMS finds rows without reading the whole file. File organization is how the records are placed in the file.

Write these points

  1. File organizations: heap (any order, fast insert) and sequential (sorted on a key, good for ranges).
  2. Hashed: a hash function on the key picks the bucket. Clustered: related rows of two tables are kept together.
  3. File operations: open, find, read, find next, insert, delete, modify, close and reset.
  4. Primary index: built on the ordering key of a sorted file. It is sparse, one entry per block.
  5. Clustering index: on a non-key ordering field. Secondary index: on a field the file is not sorted on. A secondary index must be dense, one entry per record.
  6. Multilevel index: when the index itself is too big, build an index on the index. The top level is small enough to stay in memory.
  7. B+ tree: a balanced multilevel index. All leaves are at one level, the data pointers live in the leaves and the leaves are linked for range queries. Search, insert and delete need O(log n) block reads.
  8. Hashing: static hashing has a fixed number of buckets with overflow chains. Extendible (dynamic) hashing grows a directory as buckets fill. Collisions inside one table are handled by open addressing, chaining or multiple hashing.

How many disk reads?.

1,000,000 records with 100 records per block make 10,000 blocks.

No index: up to 10,000 block reads, about 5,000 on average.

B+ tree with fan-out 100: height = log₁₀₀ 1,000,000 = 3. So 3 index reads plus 1 data block = 4 reads.

A hash index needs about 1 or 2 reads for one key, but it cannot answer a range such as Marks BETWEEN 60 AND 80.

Real-life example

The index at the back of a textbook lets you jump to 'normalization' on page 210. A database index does the same for rows, so it does not read the whole table.

A valid B+ tree with the search path for key 25 in red.
A valid B+ tree with the search path for key 25 in red.

Same or opposite: B+ tree index and hash index

PointB+ treeHash indexSame or opposite
Range queriesFastSlowOpposite
Exact matchO(log n)About O(1)Opposite
Keeps keys in orderYesNoOpposite
Speeds up searchYesYesSame

Exam tip. Draw a small B+ tree and show one search path. A primary index is sparse. A secondary index is dense. A B+ tree keeps all data pointers in the leaves. A B tree also keeps them in internal nodes.

Back to the topic list

Q14. Multivalued dependency, join dependency and 4NF

Asked 7 times in 2020, 2022, 2025 · Unit 3

From the papers

  • “Explain why 4NF is more desirable than BCNF with the help of an example.” (2020, 2022)
  • “Explain multivalued dependencies and Fourth Normal Form with an example.” (2025)
  • “Define join dependency. How is it different from multivalued dependency and functional dependency?” (2022)

The short answer

A multivalued dependency X ->> Y holds when each X value goes with a set of Y values that does not depend on the other attributes. Fourth normal form removes such dependencies.

Write these points

  1. Formal test in R(X, Y, Z): take two tuples that agree on X.
  2. X ->> Y holds if swapping their Y values gives two tuples that are also in R.
  3. Every FD is also an MVD (X -> Y means X ->> Y). The reverse is not true.
  4. MVDs come in pairs: if X ->> Y holds in R(X, Y, Z), then X ->> Z holds too.
  5. 4NF: R is in BCNF. Also, for every non-trivial MVD X ->> Y, X must be a super key.
  6. Why 4NF is better than BCNF: a BCNF table can still store every course with every hobby of a student. 4NF splits them apart, which removes that repetition and its update anomalies.
  7. Join dependency JD(R1, R2, ..., Rn): R equals the natural join of its projections R1 to Rn. An MVD is a JD with two parts. 5NF removes JDs that keys do not imply.
  8. Difference: an FD says X fixes one value of Y. An MVD says X fixes a set of Y values. A JD says R can be rebuilt from its projections.

Example.

STUDENT(Sid, Course, Hobby) with Sid ->> Course and Sid ->> Hobby. The only key is all three attributes and there is no non-trivial FD, so the table is in BCNF. Sid is not a super key, so it is not in 4NF. Split it into (Sid, Course) and (Sid, Hobby).

Real-life example

A teacher teaches many subjects and knows many languages, which have nothing to do with each other. Keeping both in one table makes every subject repeat with every language. 4NF splits them.

Independent courses and hobbies force every pair to be stored until the table is split.
Independent courses and hobbies force every pair to be stored until the table is split.

Same or opposite: BCNF and 4NF

PointBCNF4NFSame or opposite
Removes problems fromFunctional dependenciesMultivalued dependenciesOpposite
OrderComes firstNeeds BCNF firstOpposite
Lossless splitYesYesSame
Rule is aboutX → YX →→ YOpposite

Exam tip. Use the student, course and hobby example. It shows the problem in four rows. 4NF means BCNF with no non-trivial MVD unless its left side is a super key.

Back to the topic list

Q15. Cursors in PL/SQL: explicit, nested, parameterized

Asked 6 times in 2020, 2022, 2024, 2025 · Unit 5

From the papers

  • “What is a cursor? Explain nested and parameterized cursors.” (2022, 2024, 2025)
  • “Explain cursor management in PL/SQL: explicit, nested and parameterized cursors.” (2025)
  • “Short note: Cursor in SQL.” (2020)

The short answer

A cursor is a pointer to the context area, the memory Oracle uses to run a SQL statement and hold its result rows. It lets PL/SQL work through a result one row at a time.

Write these points

  1. Implicit cursor: Oracle opens it for every DML statement and every SELECT INTO. Its attributes are SQL%FOUND, SQL%NOTFOUND, SQL%ROWCOUNT and SQL%ISOPEN.
  2. Explicit cursor: the programmer declares it for a query that returns many rows. Steps: DECLARE, OPEN, FETCH in a loop, CLOSE.
  3. A cursor FOR loop (FOR rec IN c LOOP ... END LOOP;) opens, fetches and closes the cursor by itself.
  4. Parameterized cursor: it takes values when opened, so one cursor serves many inputs. CURSOR c_emp (p_dept NUMBER) IS SELECT ... WHERE Dept_ID = p_dept;
  5. Nested cursors: an inner cursor runs once for each row of the outer cursor, usually with the outer row's value as its parameter.

Steps

  1. DECLARE
  2. CURSOR c_dept IS SELECT Dept_ID, Dname FROM Dept;
  3. CURSOR c_emp (p_dept NUMBER) IS SELECT E_Name, Salary FROM Employee WHERE Dept_ID = p_dept;
  4. BEGIN
  5. FOR d IN c_dept LOOP DBMS_OUTPUT.PUT_LINE('Dept ' || d.Dname);
  6. FOR e IN c_emp(d.Dept_ID) LOOP DBMS_OUTPUT.PUT_LINE(e.E_Name || ' ' || e.Salary); END LOOP;
  7. END LOOP;
  8. END;

A parameterized cursor at work.

CURSOR c(p_dept NUMBER) IS SELECT name, salary FROM emp WHERE dept = p_dept;

BEGIN FOR r IN c(10) LOOP DBMS_OUTPUT.PUT_LINE(r.name || ' ' || r.salary); END LOOP; END;

Rows of emp: (Asha, 10, 50000), (Ravi, 10, 42000), (Meena, 20, 61000). The block prints Asha 50000 and Ravi 42000.

c%ROWCOUNT is 2 at the end. Opening c(20) instead prints only Meena 61000.

Real-life example

To print a report card for each student, the program must go through result rows one at a time. A cursor gives the program that row-by-row walk over a query result.

Life of an explicit cursor. The code above nests a parameterized cursor inside a cursor FOR loop.
Life of an explicit cursor. The code above nests a parameterized cursor inside a cursor FOR loop.

Same or opposite: implicit and explicit cursor

PointImplicitExplicitSame or opposite
Declared byOracleThe programmerOpposite
Used forSingle row and DMLMany rowsOpposite
OPEN, FETCH, CLOSEAutomaticWritten by handOpposite
Has attributes like %ROWCOUNTYesYesSame

Exam tip. Write the four steps (DECLARE, OPEN, FETCH, CLOSE) and the four attributes. A cursor parameter has a type but no size: NUMBER, not NUMBER(5).

Back to the topic list

How we picked these questions

RGPV teaches Database Management Systems to 4 branches under one syllabus. Each branch prints its own code on the paper, but the units are the same. So one page and one PDF serve all of them.

We counted every question in the Database Management Systems papers on this site by topic, from 2020 to 2025. A topic that keeps coming back is a topic RGPV likes, so it sits higher in the table. One branch alone has only a few papers. Counting them together gives a surer list.

Database Management Systems important questions by branch

CS-502 Database Management Systems important questions for CSE, Semester 5

CS-502 follows the same RGPV syllabus as the other codes on this page. The 15 topics and answers above are the CS-502 important questions too.

See all 9 CS-502 previous year papers

AD-402 Database Management Systems important questions for AI & Data Science, Semester 4

AD-402 follows the same RGPV syllabus as the other codes on this page. The 15 topics and answers above are the AD-402 important questions too.

See all 4 AD-402 previous year papers

AL-502 Database Management Systems important questions for CSE-AIML, Semester 5

AL-502 follows the same RGPV syllabus as the other codes on this page. The 15 topics and answers above are the AL-502 important questions too.

See all 1 AL-502 previous year paper

IO-502 Database Management Systems important questions for IOT, Semester 5

IO-502 follows the same RGPV syllabus as the other codes on this page. The 15 topics and answers above are the IO-502 important questions too.

See all 6 IO-502 previous year papers

About Database Management Systems

Database Management Systems (CS-502) is about storing and querying data reliably. It is a Semester 5 subject of RGPV B.Tech CSE with five units: concepts and ER modelling, the relational model and SQL, design and normalisation, transactions, and a hands-on study of a relational system. Practise SQL on a real database as you read.

Database Management Systems unit-wise brief

Unit 1: DBMS concepts and architecture

This unit compares the database approach with plain files, and covers data models, schemas and instances, data independence, database languages, the role of the database administrator, and entity-relationship (ER) modelling with generalisation, specialisation and aggregation. It also covers turning an ER diagram into tables. Draw ER diagrams for small problems.

Unit 2: Relational data model

Here you learn the relational model: tuples, attributes, relations, keys, schemas and integrity constraints, including referential integrity. Then come SQL (DDL and DML, joins, indexing, triggers and assertions), relational algebra operations such as select, project, join and division, and tuple and domain relational calculus. Write each SQL query by hand before you run it.

Unit 3: Database design and query optimisation

This unit teaches normalisation: normal forms, functional dependencies, decomposition, dependency preservation, lossless join and multivalued dependencies. It then covers query optimisation, including heuristic and cost based methods. Practise finding candidate keys and the highest normal form of a table.

Unit 4: Transaction processing and concurrency control

A transaction is a unit of work that must finish completely or not at all. The unit covers serializability, recoverability, log based recovery, checkpoints, deadlock handling, locking, time stamping and validation based protocols, and multiple granularity. It ends with an overview of distributed, temporal, deductive, multimedia, web and mobile databases, data mining and warehousing. Check serializability on small schedules.

Unit 5: Study of a relational database system

The last unit studies a real system such as Oracle or MySQL: its architecture, files, memory and processes, table spaces, security and roles. It also covers advanced SQL queries, PL/SQL blocks, cursors, exceptions, stored procedures, functions and triggers. Write one procedure and one trigger yourself.

Units follow the RGPV scheme and syllabus, B.Tech Computer Science and Engineering, Semester 5 (AICTE flexible curriculum, w.e.f. July 2019). For the full topic list of each unit, open the Database Management Systems notes.

Start with the latest papers

Database Management Systems - Dec 2025

Database Management Systems - Dec 2025

Database Management Systems - Dec 2024

See all 9 papers →

Database Management Systems (CS-502) FAQs

What are the most important topics in Database Management Systems?

By how often they were asked in the papers on this site: Keys and integrity constraints (15 times); Normalization: 1NF, 2NF, 3NF and BCNF (14 times); DBMS architecture, three levels and data independence (14 times); Relational algebra and join operations (14 times); ER model, ER diagram and conversion to tables (12 times).

How were these Database Management Systems important questions chosen?

Each topic was counted from the questions in the past papers listed on this site (2020-2025). Repeated is the number of times the topic came. The counts come from keyword matching and the answers are not teacher-reviewed, so use them together with your syllabus.

Is there a PDF of Database Management Systems important questions with answers?

Yes. The Paperwala Imp Question & Answer PDF for Database Management Systems is free to download from this page.

The 15 most repeated topics of Database Management Systems (CS-502) for RGPV B.Tech CSE semester 5, counted from the previous year papers on this site. The same syllabus is taught under 4 codes: CS-502, AD-402, AL-502, IO-502.