Oskar Dudycz 🇺🇦✊<p>Object-oriented or relational? Why not both?</p><p>For many years, we tried to fit the business data into a normalised table structure. We used Object-Relational Mappers, which was a constant battle on how to map unfitting models.</p><p>Then document databases like MongoDB came along and got traffic. </p><p>Still, many people wanted guarantees they had in relational databases, they also wanted to reuse muscle memory related to operations and other tooling.</p><p>Now we have the choice as we have <a href="https://hachyderm.io/tags/JSONB" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>JSONB</span></a> data type implemented by <a href="https://hachyderm.io/tags/PostgreSQL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PostgreSQL</span></a> and then by MySQL, SQLite.</p><p>The B in JSONB stands for binary. It looks like a JSON, it quacks like a JSON, but it's not JSON. And thanks to that, it's powerful.</p><p>When you're storing JSON data in JSONB, it's parsed, tokenised, and stored in a tree-like structure. Types are preserved, and a hierarchical structure is also preserved, and thanks to that, you can index it and efficiently query it.</p><p>I'm super happy that in recent years, I have had the opportunity to use Postgresql and JSONB, first in Marten and now in Pongo. I didn't look back. JSONB has its cons, but for most typical line-of-business applications, they're negligible.</p><p>I finally wrote an intro in <a href="https://hachyderm.io/tags/ArchitectureWeekly" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ArchitectureWeekly</span></a> about how JSONB works, check it, tell me how you liked it and share with your friends!</p><p>And most importantly, play with it on your own 😊</p><p><a href="https://www.architecture-weekly.com/p/postgresql-jsonb-powerful-storage" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">architecture-weekly.com/p/post</span><span class="invisible">gresql-jsonb-powerful-storage</span></a></p>