Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
231 What does ROLLBACK do?
Explanation
- ROLLBACK undoes the uncommitted changes in the current transaction.
- The database returns to its state before the transaction began.
Last verified on 27-11-2026
232 After a COMMIT, can the transaction’s changes be undone with ROLLBACK?
Explanation
- Once committed, changes are durable and ROLLBACK no longer applies.
- Recovery requires a new compensating transaction or a restore.
Last verified on 27-11-2026
233 In autocommit mode, when does a single INSERT take effect permanently?
Explanation
- Autocommit commits each statement as soon as it completes.
- No explicit COMMIT is needed for that statement.
Last verified on 27-11-2026
234 Which statement undoes work back to a savepoint only?
Explanation
- ROLLBACK TO SAVEPOINT undoes only the changes after that savepoint.
- Earlier work in the transaction is kept.
Last verified on 27-11-2026
235 What happens to locks held by a transaction after COMMIT?
Explanation
- COMMIT releases the transaction's locks.
- Other transactions can then access the data.
Last verified on 27-11-2026
236 What happens to locks held by a transaction after ROLLBACK?
Explanation
- ROLLBACK also releases the transaction's locks.
- The undone changes are discarded and the data is free again.
Last verified on 27-11-2026
237 Which sequence correctly transfers money in SQL?
Explanation
- Begin the transaction, do both updates, then commit them together.
- This keeps the transfer atomic.
Last verified on 27-11-2026
238 What is pessimistic concurrency control?
Explanation
- Pessimistic control locks data up front to prevent conflicts.
- It suits high-contention workloads.
Last verified on 27-11-2026
239 In a money transfer, which steps must be in one transaction?
Explanation
- Both debit and credit must be atomic: either both happen or neither does.
- Separating them risks losing or creating money.
Last verified on 27-11-2026
240 Which phenomenon is prevented by REPEATABLE READ but not by READ COMMITTED?
Explanation
- REPEATABLE READ prevents non-repeatable reads by holding read locks or versions.
- READ COMMITTED allows a row to change between reads.
Last verified on 27-11-2026