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.

Zigzag Decoding with AVX-512

https://zeux.io/2026/06/17/zigzag-decoding-avx512/
50•luu•3d ago•0 comments

Developers don't understand CORS (2019)

https://fosterelli.co/developers-dont-understand-cors
139•toilet•5h ago•55 comments

Renting a sewing machine from the library

https://www.bbc.com/future/article/20260618-the-weird-and-wonderful-libraries-of-finland
200•sohkamyung•8h ago•102 comments

Loupe – A iOS app that raises awareness about what native apps can see

https://github.com/mysk-research/loupe
220•Cider9986•19h ago•62 comments

The 100k Whys of AI

https://lcamtuf.substack.com/p/the-100000-whys-of-ai
55•surprisetalk•1h ago•19 comments

Building reliable agentic AI systems

https://martinfowler.com/articles/reliable-llm-bayer.html
66•sarangk90•3h ago•13 comments

Epoll vs. io_uring in Linux

https://sibexi.co/posts/epoll-vs-io_uring/
131•Sibexico•8h ago•36 comments

Slow breathing modulates brain function and risk behavior

https://www.cell.com/neuron/fulltext/S0896-6273(26)00339-9
162•croes•9h ago•35 comments

Show HN: TownSquare, a tiny presence layer for websites

https://townsquare.cauenapier.com/
148•cauenapier•19h ago•79 comments

15-minute at-home Lyme disease tick test

https://www.bostonglobe.com/2026/06/17/business/lyme-disease-tick-test/
94•bookofjoe•2d ago•39 comments

Your brain was never designed for this much bad news

https://www.sciencedaily.com/releases/2026/06/260614012006.htm
126•colinprince•3h ago•80 comments

Guide to the TD4 4-bit DIY CPU

https://www.philipzucker.com/td4-4bit-cpu/
27•andrewstuart•2d ago•3 comments

Public Service Announcement: Don't Say You Use AI for Writing

https://www.satisfice.com/blog/archives/488148
9•satisfice•2h ago•0 comments

SMPTE Makes Its Standards Freely Accessible

https://www.smpte.org/blog/smpte-makes-its-standards-freely-accessible-openingstandards-library-t...
248•zdw•14h ago•73 comments

The Lost Story of Alan Turing's "Delilah" Project

https://spectrum.ieee.org/alan-turings-delilah
10•asdefghyk•2h ago•1 comments

UHF X11: X11 Built for VisionOS and Apple Vision Pro

https://www.lispm.net/apps/uhf-x11/
192•zdw•14h ago•36 comments

DOS Game "F-15 Strike Eagle II" reversing project needs DOS test pilots

https://neuviemeporte.github.io/f15-se2/2026/06/20/needyou.html
235•LowLevelMahn•16h ago•62 comments

Excessive nil pointer checks in Go

https://konradreiche.com/blog/excessive-nil-pointer-checks-in-go/
12•ingve•2d ago•7 comments

When I reject AI code even if it works

https://vinibrasil.com/when-i-reject-ai-code-even-if-it-works/
154•vnbrs•6h ago•84 comments

Unauthorized alert sent to cell phones across Brazil

https://www.cnn.com/2026/06/20/americas/brazil-hackers-unauthorized-alert-latam
120•zdw•11h ago•85 comments

Armstrong Effect

https://en.wikipedia.org/wiki/Armstrong_effect
23•userbinator•3h ago•1 comments

Whole cross-sectional human ultrasound tomography

https://www.nature.com/articles/s41551-026-01660-4
63•lnyan•2d ago•10 comments

NOLA 'Nacular: One man's crusade to preserve New Orleans's vernacular signage

https://countryroadsmagazine.com/art-and-culture/people-places/nola-nacular/
35•NaOH•4d ago•2 comments

Alice is impatient

https://brooker.co.za/blog/2026/06/19/waiting.html
84•birdculture•11h ago•25 comments

Linux eliminates the strncpy API after six years of work, 360 patches

https://www.phoronix.com/news/Linux-7.2-Drops-strncpy
177•simonpure•10h ago•150 comments

Project Fetch: Phase Two

https://www.anthropic.com/research/project-fetch-phase-two
54•stopachka•7h ago•20 comments

Proportional-Integral-Derivative Controllers

https://en.wikipedia.org/wiki/PID_controller
20•dhorthy•1d ago•7 comments

Temporary Cloudflare accounts for AI agents

https://blog.cloudflare.com/temporary-accounts/
202•farhadhf•20h ago•106 comments

Show HN: StartupWiki – A Free Alternative to Crunchbase

https://startupwiki.tech/
192•shpran•15h ago•59 comments

Semiconductor Lifeline Keeps Fighter Jets in the Air

https://spectrum.ieee.org/phoenix-semiconductors-legacychips-oems
68•rbanffy•4d ago•19 comments