SQLite is Ok, but write access must be synchronized. I used it for my Flask (Python) application and was forced to switch to PostgreSQL because of synchronization problems. I would prefer sticking with SQLite which was simpler to manage. The author doesn't say a word about synchronization when writing to SQLite.
We’re pretty happy with SQLite and not urgently interested in a fancier DBMS
131–140 of 149 posts
Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS
#132Earlier quoted context omitted.
I've found sqlite's performance on bulk insertions to be massively (100x) improved by wrapping the bulk insertion in a transaction. fsync()ing a couple hundred thousand individual INSERTs isn't fast.
Those optimizations also apply to PostgreSQL.
Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS
#133SQLite is Ok, but write access must be synchronized. I used it for my Flask (Python) application and was forced to switch to PostgreSQL because of synchronization problems. I would prefer sticking with SQLite which was simpler to manage. The author doesn't say a word about synchronization when writing to SQLite.
It's intended for desktop, single-user use from the command line. In such cases, you're not going to have much of an issue with write contention.
Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS
#134While we're speaking of SQLite; one thing that has little exposure that could probably use more is that it now ships with Windows as a system DLL: https://engineering.microsoft.com/2015/10/29/sqlite-in-windo... Between that, and packages readily available on most Linux and BSD distros out there (and, in most cases, installed by default), it's well on its way to become a de facto standard system API for relational sto…
It's amusing how Microsoft's different departments keep trying to kill off each other. They spent so much time trying to shove SQL Server Express down everyone's throat, and now everyone gets SQLite included instead.
Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS
#135Earlier quoted context omitted.
I would be interested in a repo or post about your setup for the actual project; downloading, storing and using blockchain data. Sounds super interesting so if it(article, repo, site) isn't private & exists, would be keen. Cheers.
The project itself an alternative bitcoin full node, one of the few (along with btcd, bitcoinj, etc), and the only one that runs in the browser: http://bcoin.io/browser.html . I've posted it here before but no one seemed to be interested. It's probably not good if you want to index anything more than addresses, but you could easily modify it to index other things if you wanted to. The actual blockchain database resid…
Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS
#136Earlier quoted context omitted.
Also, I don't even want to try to imagine shipping an installable desktop application for non-technical users that relies on MySQL! It's really not that hard to imagine. There is an embedded library version of MySQL called libmysqld which is made for this very purpose. Of course as you point out it's quite overkill for something that would work perfectly well with Berkeley DBs.
I've never seen it used like that, but Microsoft's equivalent SQL Server Express is a nightmare in deployment and support, because you need to administer a full-blown SQL Server on every customer PC (backups, migration debugging, …). I've no idea why people don't use SQLite instead.
_SQL Server Express_ is just a free (as in beer) limited version of _SQL Server_. It's still a full-blown traditional server like MySQL, Oracle and other that require services and administration tools to be installed.
Mirosoft has 2 equivalents to SQLite: The Jet database engine is pre-installed in all versions of Windows and allows creation of .mdb databases (those used by older versions of MSAccess). You don't need to include any dll file to use it.
The other is _SQL Server Compact_ which, like SQLite, is an embedded engine that you can bundle with your application by including a library.
All of these embedded databases are able to do multi-user writes to some extent. Jet is actually quite good if careful with locking (emphasis on careful). SQLIte is a de-facto standard because it's simple, performant, cross-platform and flexible.
While it can replace full-blown databases in some cases, it's far from being always true. There are still many cases where using something like SQL Server Express may make more sense, for instance if you want to offer a path to your customer for drop-in replacement of the database based on the growth of their needs over time. Not saying it's not a costly lock-in, but it's an easy one to sell.
Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS
#137I was unfamiliar with this project and assumed it was a hosted service at first. Not so, this is a local application, so an embedded database makes sense. It took until the very last paragraph for the blog post to make that point.
Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS
#138Earlier quoted context omitted.
Were you using wal mode with sqlite? It helps a lot with locking.
I don't even know what it is so I wish I had looked it up first but now it's too late. Also mysql will aide in later replicating the application between different locations to ensure availability for each office.
Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS
#139Earlier quoted context omitted.
I've never seen it used like that, but Microsoft's equivalent SQL Server Express is a nightmare in deployment and support, because you need to administer a full-blown SQL Server on every customer PC (backups, migration debugging, …). I've no idea why people don't use SQLite instead.
_SQL Server Express_ is not the MS equivalent of SQLite. _SQL Server Express_ is just a free (as in beer) limited version of _SQL Server_. It's still a full-blown traditional server like MySQL, Oracle and other that require services and administration tools to be installed. Mirosoft has 2 equivalents to SQLite: The Jet database engine is pre-installed in all versions of Windows and allows creation of .mdb databases (…
Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS
#140Earlier quoted context omitted.
I don't even know what it is so I wish I had looked it up first but now it's too late. Also mysql will aide in later replicating the application between different locations to ensure availability for each office.
Yeah the WAL basically makes "concurrent processes reading/writing to the same database" work magically, where as without you'll get all sorts of issues and timeouts. I don't know why it isn't enabled by default, or at least more prominently advertised as an option.