frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

QueryLeaf: SQL for Mongo

https://github.com/beekeeper-studio/queryleaf
23•tilt•1y ago

Comments

ttfkam•1y ago
Would much rather have "Mongo" for SQL like this:

https://github.com/microsoft/documentdb

I am skeptical that SQL with Mongo backing it would be at all performant except in the most trivial cases. On the flip side, Postgres's jsonb indexing makes the inverse very doable.

Zambyte•1y ago
https://www.ferretdb.com/
VWWHFSfQ•1y ago
We're seeing a convergence of document DBs adding relational features, and relational DBs adding document features. At this point I find the best of both worlds to simply be PG with JSONB.

    create table document (
      id uuid primary key default gen_random_uuid(),
      doc jsonb
    );

This alone will give you a huge number of the features that Mongo provides, but also the full power of Postgres for everything else.
victor106•1y ago
this makes so much sense.

I also wonder if there are some specific capabilities of MongoDB that this pattern does not support?

etse•1y ago
Maybe not capabilities, but I'm wondering if Postgres has gotten any easier to scale horizontally. The administrative overhead of scaling and maintenance with MongoDB seemed lower to Postgres to me.

Would love to hear from others with more Postgres than I.

ttfkam•1y ago
Excluding conversations about MongoDB compatibility, PG16 added bidirectional replication for multiple writers and there are Postgres-compatible options out there for a distributed database including Citus, EDB Postgres Distributed, Yugabyte, CockroachDB, Aurora Limitless, etc.

The choices require some nuance to figure out a best fit, but then again so does any MongoDB installation (despite the marketing hype to the contrary as there are no free lunches).

You might be surprised how far most folks can typically scale with just read replica(s) on a reasonably sized writer. Add in bidirectional replication for multiple writers, and you can go even further. Beyond that, even vanilla Postgres can do it, but you'll need to do some combinations of partitioning and foreign tables.

zareith•1y ago
Curious if there is something similar that works with sqlite.
maxbond•1y ago
As of 3.38 (or 3.45 if you meant a binary JSON structure specifically) https://sqlite.org/json1.html
zareith•1y ago
We can use json type, but the dx around directly using that is not comparable to mongodb. Which is why I was looking for a similar abstraction.
aleksi•1y ago
There is FerretDB v1, which provides MongoDB protocol for SQLite. See https://github.com/FerretDB/FerretDB/tree/main-v1
zareith•1y ago
They seemed to have moved away from that.

From https://docs.ferretdb.io/migration/migrating-from-v1

> Unlike v1.x that provides options for PostgreSQL and SQLite as backend, FerretDB v2.x requires a PostgreSQL with DocumentDB extension as the backend

aleksi•1y ago
FerretDB v2 is built on top of this extension. See https://github.com/FerretDB/FerretDB
gavinray•1y ago
It's somewhat of a secret, but AWS's JDBC driver for DocumentDB supports Mongo as well

Let's you interact with Mongo as if it were a regular SQL JDBC database

https://github.com/aws/amazon-documentdb-jdbc-driver

bdcravens•1y ago
That driver is read-only
gitroom•1y ago
Honestly, putting Mongo and SQL together always confuses me a bit. I'm way more comfy with Postgres and jsonb. Anyone else feel like scaling Postgres is still kinda a pain?
sparky_•1y ago
I can appreciate the technical aspect of a translation layer, but I struggle to understand the use case for a tool like this. If your data is inherently relational, then you should be using a relational store anyway. And if it isn't, trying to hammer it on-demand into something that looks relational is going to eat you with performance implications. Unless I'm missing something.

Everything I own, owned

https://schlarp.com/posts/everything-i-own-owned/
177•schlarpc•1h ago•50 comments

How I find problems to solve as a staff engineer

https://lalitm.com/post/find-problems-staff-engineer/
245•vanpra•5h ago•93 comments

Anthropic's best AI model struggles to attract users as cheaper tools thrive

https://www.ft.com/content/5ee49718-c258-4f01-aa32-7e5b76ae5245
166•naves•6h ago•136 comments

AI Chip Architectures

https://www.jepeake.com/ai-chip-architectures
28•Finbarr•22h ago•1 comments

Google Workspace thinks my domain is an email provider (2025)

https://blog.elis.cc/articles/google-workspace-thinks-my-domain-is-an-email-provider/
155•el1s7•5h ago•35 comments

My agent.md to improve LLM-assisted code quality

https://fabiensanglard.net/agent.md/index.html
137•ibobev•6h ago•69 comments

What Is a Harness?

https://earendil.com/posts/what-is-a-harness/
280•tosh•10h ago•129 comments

How Complex Systems Fail (1998)

https://how.complexsystems.fail/
226•shortcrct•9h ago•61 comments

Implementation of GPT-2 in pure CMake

https://github.com/AlpinDale/gpt2.cmake
18•porridgeraisin•2h ago•5 comments

Malware infects Android-based automotive head unit firmware

https://securelist.com/android-head-unit-malware/121106/
205•campuscodi•11h ago•104 comments

My favorite nonfiction books about cults, scams, and schemes

https://bookdna.com/best-books/nonfiction-about-cults-scams-and-schemes
187•bwb•10h ago•65 comments

Why Sal Khan't: On Learning by Making but Teaching by Telling

https://punyamishra.com/2026/04/16/why-sal-khant-on-learning-by-making-but-teaching-by-telling/
123•the-mitr•8h ago•78 comments

A website for debloated open source alternatives

https://debloat.dev/
251•ryanvogel•7h ago•86 comments

Explain it to me like I'm ten

https://timharford.com/2026/08/explain-it-to-me-like-im-ten/
73•bookofjoe•6h ago•34 comments

Decoding silent reading from non-invasive EEG

https://arxiv.org/abs/2608.20186
22•root-parent•4h ago•10 comments

Declarative WebGPU with S-Expressions

https://hugodaniel.com/posts/declarative-webgpu-with-s-expressions/
18•hugodan•3h ago•0 comments

Rural Village in Spain Is Welcoming Digital Nomads with Open Arms

https://www.cntraveler.com/story/this-rural-village-in-spain-is-welcoming-digital-nomads-with-ope...
19•simonebrunozzi•4h ago•4 comments

Wi-Fi 8 is the first wireless upgrade in years that isn't chasing speed

https://www.xda-developers.com/wi-fi-8-first-wireless-upgrade-years-isnt-chasing-speed-home-netwo...
295•taubek•17h ago•233 comments

Kodak DC50 now usable on the Apple II

https://www.colino.net/wordpress/archives/2026/08/23/kodak-dc50-now-usable-on-the-apple-ii/
31•ibobev•8h ago•5 comments

Over 170k Nonprofits Lost All Their Data. Is Microsoft to Blame?

https://slate.com/technology/2026/08/microsoft-software-nonprofit-data-delete.html
150•tchalla•5h ago•61 comments

AI and Infrastructure Engineering

https://omegion.dev/2026/08/ai-and-infrastructure-engineering/
35•0megion•6h ago•8 comments

Parallel development without the headaches using Git worktree

https://barrd.dev/article/parallel-development-without-the-headaches-using-git-worktree/
13•oogali•2h ago•4 comments

The planet now has more trees than it did 35 years ago (2018)

https://psmag.com/environment/the-planet-now-has-more-trees-than-it-did-35-years-ago/
44•bookofjoe•2h ago•25 comments

The Vibe Tax

https://insufferable.dev/posts/vibe-tax/
98•allisdust•6h ago•76 comments

Fable and the end of the free lunch

https://www.dbreunig.com/2026/08/23/fable-the-end-of-moore-s-law.html
102•dbreunig•5h ago•86 comments

Things I want in a modern relational query language

https://sporks.space/2026/08/19/things-i-want-in-a-modern-relational-query-language/
83•zdw•1d ago•79 comments

The Remote Work Challenge: Lessons from 5 Cities

https://www.pew.org/en/research-and-analysis/reports/2026/05/the-remote-work-challenge-lessons-fr...
27•softwaredoug•7h ago•10 comments

A complex structure on S^6 [pdf]

https://alpo.ge/s6.pdf
44•robinhouston•2h ago•14 comments

Coconut oil jet fuel matches kerosene's efficiency in engine tests

https://studyfinds.com/coconut-oil-jet-fuel-matches-kerosenes-efficiency-in-engine-tests/
138•mdp2021•8h ago•157 comments

Death to px, long live ch

https://shkspr.mobi/blog/2026/08/death-to-px-long-live-ch/
60•Brajeshwar•10h ago•41 comments