ISC2 Certified Secure Software Lifecycle Professional (CSSLP) Practice Question
During testing, two concurrent transactions sometimes overwrite each other's changes to the same customer record, causing lost updates. The development team wants to allow many users to read data simultaneously but detect and reject conflicting writes only when a transaction is committed. Which database concurrency control should they implement to best address this requirement?
Disable automatic commit so transactions stay open until the application explicitly ends them.
Lower the isolation level to READ UNCOMMITTED to increase throughput and avoid locks.
Implement optimistic locking that compares a version or timestamp column at commit time.
Use pessimistic locking so each transaction obtains an exclusive lock when the row is first read.
Lost-update problems occur when multiple transactions read the same data, make changes, and then save, overwriting one another. Optimistic locking addresses this by letting transactions read without locking; just before commit, the database checks a version, timestamp, or checksum to see whether another transaction has modified the row. If a conflict is detected, one transaction is rolled back, preserving data integrity.
Pessimistic locking (such as SELECT … FOR UPDATE) prevents concurrent reads or writes by acquiring locks early, which reduces concurrency. Read-uncommitted isolation intentionally allows dirty reads and would not prevent lost updates. Disabling auto-commit changes transaction boundaries but provides no conflict detection mechanism. Therefore, optimistic locking is the most appropriate choice.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is optimistic locking and how does it work?
Open an interactive chat with Bash
How is pessimistic locking different from optimistic locking?
Open an interactive chat with Bash
Why is lowering the isolation level to READ UNCOMMITTED not a good choice to avoid lost updates?
Open an interactive chat with Bash
What is optimistic locking and how does it prevent lost updates?
Open an interactive chat with Bash
What is the difference between optimistic and pessimistic locking?
Open an interactive chat with Bash
Why is READ UNCOMMITTED isolation inappropriate for preventing lost updates?
Open an interactive chat with Bash
ISC2 Certified Secure Software Lifecycle Professional (CSSLP)
Secure Software Implementation
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .