Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
241 What is a lock in a database?
Explanation
- A lock reserves data for a transaction and blocks conflicting access.
- Locks are released at commit or rollback.
Last verified on 27-11-2026
242 What is a deadlock?
Explanation
- A deadlock is a cycle of waiting: each transaction holds a lock the other needs.
- The DBMS detects it and aborts one transaction.
Last verified on 27-11-2026
243 How does a DBMS usually resolve a deadlock?
Explanation
- The DBMS picks a victim transaction, rolls it back and lets the other proceed.
- The victim can be retried by the application.
Last verified on 27-11-2026
244 What is a savepoint in a transaction?
Explanation
- A savepoint marks a point inside a transaction for partial rollback.
- ROLLBACK TO SAVEPOINT undoes only the work after that marker.
Last verified on 27-11-2026
245 Which statement starts a transaction in SQL?
Explanation
- START TRANSACTION or BEGIN TRANSACTION begins a transaction.
- In many systems a transaction also starts implicitly with the first statement.
Last verified on 27-11-2026
246 What is the purpose of a transaction log?
Explanation
- The transaction log records changes for recovery.
- After a crash it redoes committed work and undoes uncommitted work.
Last verified on 27-11-2026
247 Which ACID property does the transaction log mainly support?
Explanation
- The log supports durability by recording committed changes and atomicity by allowing rollback.
- Without it a crash could lose or partly apply a transaction.
Last verified on 27-11-2026
248 What is two-phase locking?
Explanation
- Two-phase locking has a growing phase for acquiring locks and a shrinking phase for releasing them.
- It guarantees serializability.
Last verified on 27-11-2026
249 What is optimistic concurrency control?
Explanation
- Optimistic control lets transactions proceed without locks and validates at commit.
- If a conflict is found the transaction is rolled back and retried.
Last verified on 27-11-2026
250 What is a non-repeatable read?
Explanation
- A non-repeatable read means a row changes between two reads in the same transaction.
- REPEATABLE READ isolation prevents it.
Last verified on 27-11-2026