38.8k views
5 votes
The lost-update problem can be prevented by a type of locking which must be used to coordinate the activities of users who know nothing about one another.

a-true
b-false

1 Answer

2 votes

Final answer:

The lost-update problem can be prevented by using locking, which is true.

Step-by-step explanation:

The statement is true.

Locking is a technique used in database management systems to prevent data inconsistency and maintain data integrity. One type of locking that can be used to prevent the lost-update problem is called two-phase locking. In two-phase locking, users request locks on data items before accessing them and release the locks only after completing their transaction. This ensures that concurrent transactions do not overwrite each other's updates and eliminates the lost-update problem.

For example, consider two users accessing the same bank account. If both users attempt to update the account balance at the same time, a lost-update problem can occur where one user's update is lost. By using locking, each user can acquire a lock on the account balance before making any changes, preventing other users from accessing or modifying the balance until the lock is released.

User Mani Tajaddini
by
8.8k points