TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What Happens When You Put a Database in the Browser?

106 pointsby self11 months ago

8 comments

xnorswap11 months ago
I don&#x27;t understand these &quot;DB in browser&quot; products.<p>If the data &quot;belongs&quot; to the server, why not send the query to the server and run it there?<p>If the data &quot;belongs&quot; on the client, why have it in database form, particularly a &quot;data-lake&quot; 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&#x27;t fit in memory (and possibly not even on single disks&#x2F;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&#x27;s small enough to fit in memory, which means it&#x27;ll be fast to query no matter how you go about it.<p>The page says one advantage is &quot;Ad-hoc queries on data lakes&quot;, but isn&#x27;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?
评论 #40800291 未加载
评论 #40799994 未加载
评论 #40799639 未加载
评论 #40799676 未加载
评论 #40799492 未加载
评论 #40800351 未加载
评论 #40800621 未加载
评论 #40799456 未加载
zX41ZdbW11 months ago
I tried <a href="https:&#x2F;&#x2F;shell.duckdb.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;shell.duckdb.org&#x2F;</a>, but it was a very rough experience.<p>The &quot;delete&quot; button does not work. The &quot;home&quot; button inserts a whitespace. Pasting with &quot;Ctrl+v&quot; 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&gt; SELECT * FROM &#x27;https:&#x2F;&#x2F;clickhouse-public-datasets.s3.amazonaws.com&#x2F;github_events&#x2F;partitioned_json&#x2F;*.gz&#x27; ...&gt; ; Catalog Error: Table with name https:&#x2F;&#x2F;clickhouse-public-datasets.s3.amazonaws.com&#x2F;github_events&#x2F;partitioned_json&#x2F;*.gz does not exist! Did you mean &quot;sqlite_master&quot;? LINE 1: SELECT * FROM &#x27;https:&#x2F;&#x2F;clickhouse-public-datasets.s3.... </code></pre> Suggesting the &quot;sqlite_master&quot; database is also misleading.
评论 #40860213 未加载
jeroenhd11 months ago
Why run a database in WASM when IndexedDB exists? Browsers already have a database built in, I don&#x27;t see the need to download another one.
评论 #40798844 未加载
评论 #40798902 未加载
评论 #40799021 未加载
评论 #40798857 未加载
评论 #40798708 未加载
评论 #40798674 未加载
评论 #40798917 未加载
评论 #40799538 未加载
Zambyte11 months ago
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:&#x2F;&#x2F;pouchdb.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pouchdb.com&#x2F;</a><p>[1] <a href="https:&#x2F;&#x2F;couchdb.apache.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;couchdb.apache.org&#x2F;</a>
gregw211 months ago
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.
评论 #40799745 未加载
评论 #40755449 未加载
threeseed11 months ago
They didn&#x27;t mention the lifecycle of the database.<p>Because if it&#x27;s anything longer lived than a week then it could be used by marketers to evade Apple&#x27;s ITT for retargeting.<p>Which would be a huge win for advertisers and a loss for privacy.
评论 #40800040 未加载
cryptonector11 months ago
Supercookies?
voidUpdate11 months ago
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?
评论 #40799325 未加载
评论 #40801416 未加载
评论 #40802449 未加载
评论 #40799447 未加载
评论 #40799733 未加载