Database Reference
In-Depth Information
282.......331.50
282.......531.50
Ryan
Database on disk
Elena
236
282.......331.50
282.......331.50
Ryan
Database on disk
Elena
FIGURE 7-6
Ryan's and Elena's updates to the database result in a lost update (continued)
Avoiding the Lost Update Problem
One way to prevent lost updates is to prohibit concurrent update. This may seem drastic, but it is not really
so farfetched. You can let several users access the database at the same time, but for retrieval only; that is,
the users can read data from the database, but they can
t update any data in the database. When these users
need to update the database, such as increasing a customer
'
s balance or changing the price of a part, the
database itself is not updated. Instead, as shown in Figure 7-7, a special program, which a computer program-
mer would create for the users to use with the data in their database, adds a record to a separate file.
'
1. Retrievals of data
from the database
1. Retrievals of data
from the database
Premiere
Products
database
DBMS
User
2. Updates to data
in the database
Database
update
pre-processing
program
3. Program interacts
with users during the day to
store their database updates
in a separate ile
User
4. Program runs
once a day to update
the database
Updates to the
Premiere Products
database
Database
update
program
FIGURE 7-7
Delaying updates to the Premiere Products database to avoid the lost update problem
 
Search WWH ::




Custom Search