Re: Questions about multiuser locking in database design

From: Walt <foo_at_on.spammers>
Date: Thu, 31 Jan 2002 00:39:18 -0700
Message-ID: <ptsh5ugck1gjpqqi97m1bnerolueqr3f2h_at_4ax.com>


On Thu, 31 Jan 2002 00:11:42 -0500, Jerry Gitomer <jgitomer_at_erols.com> wrote:

>Locks should be at a record level except when physically
>reorganizing indexes.
>If I remember correctly you are using flat files and therefore,
>by definition,
>won't have any indexes to reorganize, so in your case, use
>record level locks.

Uh-oh, you've unearthed either a terminology error on my part, or a big hole in my understanding.

By flat files, I meant that it wasn't relational - tables of records stand alone and won't need reorganizing based upon other tables that change. But I have written index files, ordered sets of record numbers again various indexed fields so the database can be searched quickly by more than one field. What did I miss here?

>Test and set is an atomic operation and is found in many machine
>instruction
>sets. use semaphores and read the manual very carefully to make
>sure that you
>have an atomic test and set capability for them. If not you
>write a block of
>code which everyone must go through in order to update and make
>it serial in
>nature. Much slower than hardware, but it guarantees data
>integrity.

I'll see if I get at semaphores at all from C and perl. Thanks again!

walt Received on Thu Jan 31 2002 - 08:39:18 CET

Original text of this message