Re: data integrity

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: data integrity
Дата
Msg-id Pine.LNX.4.33L2.0111061209170.10588-100000@aguila.protecne.cl
обсуждение исходный текст
Ответ на data integrity  (Jelle Ouwerkerk <jelle@openface.ca>)
Список pgsql-general
On Mon, 5 Nov 2001, Jelle Ouwerkerk wrote:

> Problem: How are people dealing with data integrity issues such as stale
> data when writing web-based apps? For instance:
[...]

> In some scenarios, user B should be prevented from updating.

Maybe you can do something like this:

user A SELECTs the data, and the web app caches the fields.
user B does the same thing.
user B changes some fields and commits.
user A changes some fields and tries to commit. His webapp SELECTs the
data again and checks against its cache.
Since the data is different, the webapp presents him the three versions
and lets him choose.

The idea is to check every time you are going to commit the data to see
if it changed while you weren't looking. If it did, tell him so and let
him decide.

--
Alvaro Herrera (<alvherre[@]atentus.com>)
"Ni aun el genio muy grande llegaria muy lejos
si tuviera que sacarlo todo de su propio interior" (Goethe)


В списке pgsql-general по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: [pgadmin-hackers] Use of Serial Datatype and Sequen
Следующее
От: Masaru Sugawara
Дата:
Сообщение: Re: Probably simple answer