I have come across many relational database management systems (RDBMS). But recently I used hibernate which made me start wondering why Object Oriented databases aren’t more popular.
If object oriented languages like Java or C# are so popular, then why aren’t object-oriented database management systems (OODBMS) more popular too?
14
There are multiple reasons.
- Many developers are only experienced in relational data modeling. To use OO databases, they would need to learn completely different way to model and think about data. This is either really hard or quite time consuming.
- Relational DBs had lot of time to mature. Even free relational DBs have advanced optimization and indexing techniques. Also, relational data is easy to store and index. Same thing cannot be said about OO databases.
- When relational and OO models started to emerge. Relational had huge edge that it was mathematically “correct” and it had it’s standard for saving and querying data. OO had nothing of sort.
- [speculation]Many big players put lots of resources into making their relational DBs. It would be counterproductive to support OO DBs instead. So many of them instead invested into integrating OO principles into relational model, making most current DBs so-called object-relational. IMO these models are worst than pure relational or pure OO.[/speculation]
- [rant]Last thing to note is that many developers don’t really understand OO way to model data. This usually results in suboptimal, anemic models. So many development companies, that rely on cheap and inexperienced developers would rather choose simple, relational model, that is taught in all CS colleges than pick hard and unproven OO aproach.[/rant]
5
When databases first appeared, OOP still wasn’t the way to program. Relational databases, on the other hand, gained a lot of traction. And SQL introduced in the 80’s by IBM quickly became lingua franca of all databases.
When OOP become popular there were some attempts, but there are some problems. First, true OODBMS is really hard to implement. In case of a relational database, a table and related indexes are fairly simple structures (eg. B-trees).
Another reason is that there is a lot of theory behind relational model, it’s directly derived from mathematical set theory. There are known ways to correctly design a relational database (think normalization etc). And last but not least, people already got used to SQL a lot.
Modern-day NoSQL solutions in most cases aren’t really a step towards OODBMS. Many of them are still relational, only stripped of JOINs
. Few of them are in fact object stores but are not truly OODBMS, as they are not aware of relations between the objects.
Yet another reason why there is not such a strong push for OODBMS is that there is “poor man’s OODBMS” solution — ORMs. This has gained huge popularity, as they are backed by well known, stable and tested DB engines, yet they provide the mapping to objects. Of course, these are not true OODBs.
2
OODBMS are good at storing complex data. However, most of the time, even when using OO languages, the needed data is relatively simple. So traditional RDBMS are more suited.
1