Subject Re: locking a database
Author martinknappe
i didn't mean to offend your work
only, i'm new to firebird and databases in general and i find it
sometimes hard to find the exact piece of information i need in the
jungle of docs
i was only thinking that if you have several write-authorised users
simultaneously connected to a database and user 1 for instance
modifies an entry in transaction 1 while user 2 deletes the exact same
entry in transaction 2, you would end up with inconsistent data..

so, in the course of one transacition, all other transactions are
blocked from modifying by default or do i have to configure that
myself? if so, is it a server-wide configuration that applies for all
registered databases or do i have to configure that (e.g. via isql)
for each and every database?
i'm working on a database app for my college degree and for now i'm
still doing everything (client-app and firebird) on my own machine but
it's all supposed to be ported at the end to client-server and i was
starting to worry about how this all behaves when multiple clients are
connected to one database on a remote host...

thanx for any directions


--- In, "Ann W. Harrison"
<aharrison@...> wrote:
> martinknappe wrote:
> >
> > i was looking for a way to 'lock' my database for other users while it
> > is being accessed by by someone with insert/update privileges; is that
> > possible?
> We went to a lot of trouble to make such locking unnecessary, so
> my question back to you is, "Why?" One way to get what you ask
> for is to have your privileged users connect through the embedded
> engine. Since the embedded engine gets a non-shared lock on the
> database, other access will be blocked. Another approach is to
> have insert/update users start transactions reserving all tables
> for protected write - that won't block most readers, but will
> block all other writes.
> But we've worked very hard to make it possible for readers and
> writers to coexist - why not let it happen?
> Regards,
> Ann