Subject Re: [firebird-support] Firebird 2.5 and multi user
Author Werner F. Bruhin

On 27/05/2010 23:41, Michael Ludwig wrote:
> Werner F. Bruhin schrieb am 27.05.2010 um 10:40:58 (+0200):
>> I currently use FB 2.1 but only single or max. 2 users are connecting
>> at the same time.
>> I would like to go "real" multi users, i.e. at least tens if not
>> hundreds of connections.
> You can have those connections for only one user. Most web applications
> use one user - like "www" - representing the application on behalf of
> whatever user behind the browser owns the session.
I am still investigating, but the application will most likely not be
browser based, it might be a desktop app (Python, wxPython) "just"
accessing the db over the Internet or doing it as an RIA (Rich Internet
Application) using a tool like .
>> There are some obvious changes I need to do for data owner ship (i.e.
>> a userid in a lot of tables) but I wonder what else I need to watch
>> out for.
>> Are there some good links people can recommend I should read before
>> starting with all this,
> You haven't properly defined "all this". :-) The context is missing so
> it's difficult to figure out what you're about to do. What kind of app
> etc?
Fair enough, also I am looking for "generic" papers/tutorials on dealing
with multiple users in the database.

The application is a wine cellar management for hobby wine enthusiasts,
it is currently available as shareware. Some users have requested to be
able to exchange data, which is currently possible using the vinoXML
standard, but this is off-line and not that convenient.

It "allows" multi user access over a LAN, what I want to do is allow
access to the db over the Internet and have a "central" database which
is shared and a "local" database which is owned/controlled by each
user. Obviously a potential synchronization headache (or a nice
challenge :-) ).

The shared data is all the master data such as countries, wine regions
etc etc, and all the wine specific data such as wine information,
vintage, tasting notes etc and then there is private data such as the
consumption and purchase history.

The challenges I am already aware of are:

- within the master data most tables have to handle multiple languages,
current shareware supports this, but only one language is active (i.e.
all users accessing the system have to use the same one). So, needs to
be redesigned and allow language selection per user. For this I have
two different designs done in a test environment. One is an "gettext"
type implementation using stored procedures (Karsten Hilbert from the
gnuMed project did the original implement and the second one uses a
"translation" table per table for any column which needs translation.
Still very much open for other ideas on how one could deal with this.
- user table needs to be added and necessary relations to just about all
the tables. As e.g. in the master data tables I want to allow users to
add their own codes, which won't be visible by the "world" unless an
"admin" makes them visible

Do I have to worry about concurrent access to the same data or can I
just "depend" on FB handling this for me. I.e. two users access the
same row, can I count on the FB engine to allow both updates to go
through, the later one will obviously overwrite the earlier one. I
think I am fine assuming I read the following correctly:,

Hope this is a bit clearer, also I am pretty sure that I still miss things.