Q34.Marks: +2.0UGC NET Paper 2: Computer Sc 6th Jan 2025 Shift 1
In concurrency control, phantom problem may occur, when-
1.records are inserted✓ Correct
2.records are deleted
3.records are modified
4.records are indexed
Solution
The correct answer is records are inserted.
Key Points
In concurrency control, the phantom problem occurs when records are inserted into the database during the execution of a transaction.
The phantom problem arises in a situation where a transaction reads a set of records that satisfy a certain condition, and another transaction inserts new records that also satisfy the same condition.
For example, if Transaction A reads all records where the age is greater than 30, and Transaction B inserts a new record with age 35, Transaction A may miss this new record if it reads again.
This leads to inconsistency because Transaction A's subsequent read operations may return a different set of records.
To prevent the phantom problem, isolation levels like Serializable are used, which ensures that no new records can be inserted that satisfy the condition during the transaction execution.
Additional Information
Concurrency control is essential in database management systems to ensure the correctness and isolation of transactions.
Other common concurrency problems include lost updates, dirty reads, and unrepeatable reads.
Different isolation levels (Read Uncommitted, Read Committed, Repeatable Read, and Serializable) provide different levels of protection against these problems.
The Serializable isolation level is the most restrictive and ensures complete isolation but can impact performance due to its strict locking mechanisms.