Live data from Hacker News

DuckDB – An embeddable SQL database like SQLite, but supports Postgres features

duckdb.org

51–60 of 167 posts

Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features

#51
post #2

I was hoping from the title that it aims for postgres SQL compatibility, but I can't find it explicitly mentioned in the docs. This really makes me think I really want something like sqlite://memory which completely disregards speed or even persistence. Instead you could say for example "open an in-memory database that behaves like postgres 9" and run your tests against it. With typical fixtures of 10 or so rows, you…

I would just create a per-test-file database (and delete it the next time the test runs). The overhead is very small (compared to booting Postgres) and it works exactly like production because it is exactly production. In general, I am not comfortable using an "almost equivalent" database for tests. Every database engine has its quirks, and if you don't know what they are, your program that passes its tests only "alm…

And if you need to run expensive migrations, use a template database.

https://www.postgresql.org/docs/current/manage-ag-templatedb...

Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features

#53
post #22

I spent a while looking at this today. It's really interesting. It's not based on SQLite at all (except for borrowing the SQLite shell implementation) but it looks very much like SQLite, in particular: - It's designed to work as an embedded library, eliminating the network overhead you usually get when talking to a database - Each database is a single file on disk - It ships as an "amalgamation" build - a single gian…

And MonetDB took some inspiration back from DuckDB to develop an embedded version also:

https://github.com/MonetDBSolutions/MonetDBe-Python/

Disclaimer: i'm working on this.

Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features

#56

First of all, really neat project. There's an issue with the Installation section of the web page, though. Running Chrome on Linux, it says "System detected: Linux", which is right. But under "CLI", it offers me a download of duckdb_cli-osx-amd64.zip. Just in case it was just the zip file name that's wrong, I downloaded it, but the duckdb binary inside is a "Mach-O 64-bit x86_64 executable" according to the file comm…

Thanks for reporting that! We will have a look at fixing it :)

FWIW I got the same issue on Android, though offering me the "correct" link wouldn't do me much good either :)

Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features

#57
This is slightly offtopic but do you guys have any good guides/best conventions how to save timeseries data to sqlite/similar? I'm no DB expert so struggling with this. I'm having a dynamic number of measurements that usually have the same timestamp. So one table for timestamp_id, signal_id and value?

Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features

#58
post #22

I spent a while looking at this today. It's really interesting. It's not based on SQLite at all (except for borrowing the SQLite shell implementation) but it looks very much like SQLite, in particular: - It's designed to work as an embedded library, eliminating the network overhead you usually get when talking to a database - Each database is a single file on disk - It ships as an "amalgamation" build - a single gian…

And MonetDB took some inspiration back from DuckDB to develop an embedded version also: https://github.com/MonetDBSolutions/MonetDBe-Python/ Disclaimer: i'm working on this.

Could you elaborate on some of the similarities and differences between DuckDB and MonetDB?

Re: DuckDB – An embeddable SQL database like SQLite, but supports Postgres features

#59
Very cool project! Seems basically to be a column store and stores everything in a single file.

That reminds me of LMBD, which is similar in some ways, except bring a key/value store. Very highly recommend checking it out too to see what embeddable DB makes sense for your project.

http://www.lmdb.tech/doc/

Post reply on HN