I don't understand these "DB in browser" products.<p>If the data "belongs" to the server, why not send the query to the server and run it there?<p>If the data "belongs" on the client, why have it in database form, particularly a "data-lake" structured db, at all?<p>A lot of the benefits of such databases are their ability to optimise queries for improving performance in a context where the data can't fit in memory (and possibly not even on single disks/machines), as well as additional durability and atomicity improvements. If the data is small enough to be reasonable to send to a client, then it's small enough to fit in memory, which means it'll be fast to query no matter how you go about it.<p>The page says one advantage is "Ad-hoc queries on data lakes", but isn't that possible with the most basic form that simply sends a query to the database?<p>What am I failing to understand about this category of products?
I tried <a href="https://shell.duckdb.org/" rel="nofollow">https://shell.duckdb.org/</a>, but it was a very rough experience.<p>The "delete" button does not work. The "home" button inserts a whitespace. Pasting with "Ctrl+v" also does not work. Every keypress results in blinking, and there is a notable input lag.<p>When I tried a query<p><pre><code> duckdb> SELECT * FROM 'https://clickhouse-public-datasets.s3.amazonaws.com/github_events/partitioned_json/*.gz'
...> ;
Catalog Error: Table with name https://clickhouse-public-datasets.s3.amazonaws.com/github_events/partitioned_json/*.gz does not exist!
Did you mean "sqlite_master"?
LINE 1: SELECT * FROM 'https://clickhouse-public-datasets.s3....
</code></pre>
Suggesting the "sqlite_master" database is also misleading.
Another interesting option is PouchDB[0], which is a Javascript implementation of the CouchDB[1] synchronization API. It allows you to acheive eventual consistency between a client with intermittent connectivity, and a backend database.<p>[0] <a href="https://pouchdb.com/" rel="nofollow">https://pouchdb.com/</a><p>[1] <a href="https://couchdb.apache.org/" rel="nofollow">https://couchdb.apache.org/</a>
I am not 100% clear how this works...<p>If you query a Parquet file from your lake via DuckDB-in-browser, does DuckDB run in WASM on the web client and pull the compressed parquet to your browser where it is decompressed?
Or are you connecting some DuckDB on the web client to some DuckDB component on a server somewhere?<p>I presume yes to the first and no to the second but just checking I have my mental model correct.
They didn't mention the lifecycle of the database.<p>Because if it's anything longer lived than a week then it could be used by marketers to evade Apple's ITT for retargeting.<p>Which would be a huge win for advertisers and a loss for privacy.
So when I want to browse your website on my phone with a limited data plan, I have to download an entire database client and database, as well as any of your other huge JS libraries?