💡 What if your architecture could add enough layers to normalize and denormalize at the same time? Discover this revolutionary design pattern.
https://dev.to/franckpachot/the-single-duality-view-pattern-can-sqljson-preserve-aggregate-locality-4ifd
| https://twitter.com/FranckPachot | |
| ✍🏼Blog | https://dev.to/franckpachot |
| https://www.linkedin.com/in/franckpachot/ | |
| 📺Youtube | https://www.youtube.com/@franckpachot/community |
SQL databases rely on relational algebra and normal forms. Document databases use comparable math, just starting from non-1NF instead of 1NF. A 1986 paper, "Theory of Non-First Normal Form Relational Databases," introduced nested relations, expanded relational operators, and a query language called SQL/NF. Great concepts to understand document database modeling and its use. To make it easier, I mapped each concept to its modern equivalent, MongoDB, with examples:
Top‑K BM25 range + text search on 100 million MongoDB documents in under two seconds (I reused the excellent ParadeDB example for this test)
https://dev.to/franckpachot/top-k-queries-with-mongodb-search-indexes-bm25-3a41
No rewind needed! MongoDB smoothly handles secondary nodes rejoining the replica set thanks to its recover-to-timestamp rollback in its Raft-inspired algorithm. Observe this in action with w:1 writes, where the rolled-back data isn’t lost but saved in a rollback directory: