4 ms·
> I've been using SQLite and Postgres’ inability to be wrapped in Java (ie SQLite can be run as a Java jar, but PG need to be installed separately, because it’
by eastbound 2y ago
> I've been using SQLite and
Postgres’ inability to be wrapped in Java (ie SQLite can be run as a Java jar, but PG need to be installed separately, because it’s in C) gives it a major, major drawback for shipping. If you ship installable software to customers, you’ll either have to make it a Docker or publish many guidelines, let alone customers will claim they can only install Oracle and then you’ll have to support 4 DBs.
How have you found SQLite’s performance for large-scale deployments, like if you imagine using it for the backend of Jira or any webapp?
- epcoa 2y agoSQLite is written in C. And the most commonly used SQLite driver interfaces to that compiled C code directly via JNI. The PostgreSQL client driver is written in pure Java on the other hand. Has nothing to do with language used. You can wrap anything in a jar (it’s just a zip file). You could certainly embed PostgreSQL in a jar and you can do something similar to this https://github.com/electric-sql/pglite https://github.com/electric-sql/pglite I don’t think there’s that much interest, but it is doable. EDIT: https://github.com/zonkyio/embedded-postgres https://github.com/zonkyio/embedded-postgres
- KronisLV 2y agoIf you need a database that you can embed in Java, have a look at: H2: https://www.h2database.com/html/main.html https://www.h2database.com/html/main.html HSQLDB: https://hsqldb.org/ https://hsqldb.org/ Apache Derby: https://db.apache.org/derby/ https://db.apache.org/derby/ Though those would certainly be a bit niche approaches, so you'll find that there are fewer examples of using either online.