'Lite' Databases (Re: sqlite3 and dates)

rurpy at yahoo.com rurpy at yahoo.com
Wed Feb 18 23:10:14 EST 2015


On 02/18/2015 07:13 PM, Steven D'Aprano wrote:> Chris Angelico wrote:
>>> SQLite misses some important features that makes it better suited as a
>>> simple datastore, not much unlike shelve. And network use is not one
>>> of them, since you can actually implement concurrent sqlite access by
>>> coding an intermediate layer. Assuming of course we are talking about
>>> a small number of concurrent users.
>>
>> This is what I was saying: it's fine for purposes like Firefox's
>> bookmarks and settings and such (which I think was what it was
>> originally developed for?). Not so fine over a network.
> 
> The sheer number of Firefox bugs related to its use of SQLite says
> different.
>
> Once upon a time, Firefox's config, bookmarks, etc. were stored in plain
> text files. At worst they were HTML. You could trivially read them, copy
> them, restore them and even (if you were careful) edit them using the text
> editor of your choice. Many a time I was on one machine, wanted to know a
> bookmark from another machine, so I would ssh across to the other machine
> and run grep over the bookmark file.

I agree, I prefer plain text files whenever practical.  But since 
the original discussion was about Sqlite vs Postgresql, not Sqlite
vs text files, shouldn't the question be: would Firefox be better 
if it required you to install and configure Postgreql instead of 
using Sqlite?

> No more. Firefox still keeps a bookmark HTML file, but it never seems to be
> synced with the actual bookmarks. Settings are stored in an opaque blob,
> rather than human-readable text, limiting what you can do with it. It's very
> nice that Firefox offers about:config but not so nice that you can't do the
> same thing without the GUI running.
> 
> If Firefox crashes, there are failure modes where it can no longer read your
> bookmarks, or keep history. I don't mean that history won't persist across
> restarts, I mean that *within a single session* it cannot remember what page
> you came from so you can hit the Back button and return to it. WTF?
> 
> I swear, if not for the fact that every single other browser is worse, I
> would dump Firefox in a second.
> 
> I don't believe for a second that moving to SQlite has anything to do with
> performance, because reading and writing preference settings should be rare
> and far from a bottleneck. SQlite is simply fragile and unreliable over a
> network, and people using their home directory on a network drive are not
> that rare.

I don't see any evidence that it is Sqlite that is the problem
as opposed to FF's use (or misuse) of it, or other problems that
are in FF and have nothing to do with Sqlite.  If Sqlite reliably 
implements ACID semantics as they claim, is certainly should be 
possible to make use of it without the problems you (and I too) 
see.  And there is no reason to believe the situation would be
any better with Postgresql.



More information about the Python-list mailing list