18

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?

  • 1
    "NoSQL" approach is extremely popular now. RDBMSes are limited and limiting, and, fortunately, they're loosing their ground now quickly. – SK-logic Dec 3 '12 at 11:03
  • What do you refer as oodb? hibernate is just a framework to communicate with rdbms with an oo interface. – Simon Bergot Dec 3 '12 at 11:23
  • 2
    Similar question was asked 2009 on SO, see stackoverflow.com/questions/1350044/… IMHO almost every answer given there is still valid today. – Doc Brown Dec 3 '12 at 11:44
  • @Simon by oodb , I mean object oriented databases – user65878 Dec 3 '12 at 11:54
  • 1
    @Simon: Versant is an oodb (I have seen in production in two different companies). – Giorgio Dec 3 '12 at 12:06
11

There are multiple reasons.

  1. 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.
  2. 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.
  3. 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.
  4. [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]
  5. [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
    I agree with all your points except the last. I think its way easier for developers to mess up relational databases than object databases. Composite keys and broken relationships are very common, but it seems to me at least a little harder to mess up a class hierarchy. – Tjaart Dec 3 '12 at 11:24
  • @Tjaart messing up class hierarchies seems to be the norm for most developers in OO. – Bent Jul 6 '18 at 8:16
  • Your first point is not correct. If you are using OOP paradigm as a developer, you know how to model data. The whole point is that you don't need relational modeling, you just use the modeling you have been using in your code, i.e. your data structures – Benjamin Erichsen Feb 2 at 18:08
  • Another issue is if multiple applications share a database. They are all coupled to the data model. If one app wants to change it, then this could break the other applications. Martin Fowler talks about this. Yeah changes in the schema can happen in relational databases, but the schema is definitely not as fragile in the average case. – Benjamin Erichsen Feb 2 at 18:10
  • I am not sure that an object database is superior to a relational database and ORM combination. One common use case of SQL database is ad-hoc queries - questions we want to ask that we may not have considered before e.g. for marketing or business intelligence. A lot of times this is done by non-developers who just know sql. Sure you could add some SQL engine on top of the object database, but this would not be as performant on large data sets, and would just be more code in the end, as opposed to having an ORM and a relational db – Benjamin Erichsen Feb 2 at 18:13
10

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.

  • "Yet another reason why there is not such a strong push for OODBMS is that there is "poor-man's OODBMS" solution — ORMs.": Very good point! +1. – Giorgio Dec 4 '12 at 16:35
  • That's not true. MUMPS was designed in 1966 and only by 1974, the first research project was started by IBM to develop the System R, the world first RDBMS. Oracle only released their world-first commercial-grade RDBMs in 1979, the same year when InterSystems M came to light. The question is what happened after that. The answer is probably that ODBMSes weren't optimised for reporting, while the majority of use-cases of LOB applications have a heavy read-write disbalance towards reads. – Alexey Zimarev Nov 4 '18 at 14:33
-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.

  • 2
    Data is almost never simple, and I think you fail to explain why OODB is not more popular because after all ORM is doing very well. – Tjaart Dec 3 '12 at 11:20