Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
221 Which DDL statement may cause an implicit commit in MySQL?
Explanation
- In MySQL, DDL such as CREATE TABLE causes an implicit commit.
- A transaction cannot be rolled back across that point.
Last verified on 27-11-2026
222 What does autocommit mode do?
Explanation
- In autocommit mode each statement is its own transaction and commits at once.
- To group statements, turn autocommit off and use explicit BEGIN and COMMIT.
Last verified on 27-11-2026
223 What does ROLLBACK do to a savepoint created earlier in the same transaction?
Explanation
- A partial rollback to a savepoint keeps the transaction alive.
- A full ROLLBACK ends the transaction and discards all its work.
Last verified on 27-11-2026
224 Which of the following is a transaction?
Explanation
- A money transfer is a classic transaction: several writes that must succeed together.
- A single SELECT is a read, not a multi-step update unit.
Last verified on 27-11-2026
225 After ROLLBACK TO SAVEPOINT s1, what happens to changes made before s1?
Explanation
- Only work after the savepoint is undone; earlier work remains pending.
- The transaction can still commit or roll back the rest.
Last verified on 27-11-2026
226 What is meant by serializability?
Explanation
- A serializable schedule is equivalent to running transactions one after another.
- It is the correctness standard for concurrency.
Last verified on 27-11-2026
227 Which statement creates a savepoint named s1?
Explanation
- SAVEPOINT s1 creates a marker named s1.
- Use ROLLBACK TO SAVEPOINT s1 to return to it.
Last verified on 27-11-2026
228 Which lock type allows reading but blocks writing by others?
Explanation
- A shared lock allows multiple transactions to read but blocks exclusive writes.
- An exclusive lock blocks both reads and writes by others in most systems.
Last verified on 27-11-2026
229 What is an exclusive lock?
Explanation
- An exclusive lock is held for writing and blocks other transactions from the data.
- It is released at commit or rollback.
Last verified on 27-11-2026
230 What does COMMIT do?
Explanation
- COMMIT saves the transaction's changes permanently.
- After commit the changes are durable and visible to others.
Last verified on 27-11-2026