On 4 Aug 2017, at 11:43am, Luc DAVID <[email protected]> wrote:
> sqlite was not designed for this kind of access but It would be great to have
> a higher level of concurrency
The problem with these things is that you have SQLite trying to read the minds
of he programmer and user. Consider two operations being done by different
computers at the same time:
UPDATE contacts SET phone = REPLACE (phone, '444', '555')
INSERT INTO contacts VALUES ('Charles', '444 1234')
The first one is done because an entire phone exchange got renumbered to make
way for a new exchange. The second is a new contact. But the two operations
were in overlapping transactions. When they’re both finished should the new
contact have '444' or '555' ?
Here’s another scenario. Suppose you have an invoice file so you can invoice
those contacts, and the key of the invoice file is the rowid of the contact
file. Two users each want to create an invoice for a new contact at the same
time. The software running on their computers needs to insert the new contact,
then find the rowid of the new contact so it can create an invoice for it. How
can you arrange this when the transactions can overlap ?
The problem you’re trying to fix is one of the big problems with distributed
databases. Nobody has found a good solution for it yet.
Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users