Object-oriented or relational? You’ve seen this battle in your projects. For many years, we tried to fit the business data, which is usually grouped by business use case, into a normalised table structure. Sometimes it fits better, sometimes worse. We learn to cheat it with Object-Relational Mappers. They fixed some issues but created others.
Then document databases appeared, trying to look at this perspective from a different angle. They tried to accept that real-world data is fuzzy and usually doesn’t follow the rigid structure, but it’s semi-structured. It's the classic dilemma: rigid schemas that ensure data integrity but resist change, versus flexible document stores that adapt easily but sacrifice guarantees.
Still, those databases didn’t give us the consistency guarantees we were comfortable with, like transactions, isolation levels, etc.
PostgreSQL added the JSONB column type to answer the question: "Can we have both?".
Then other databases like MySQL and SQLite followed.
Let’s discuss today how it works, and if it’s the actual answer.
continue reading on www.architecture-weekly.com
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.