tags:

views:

510

answers:

10

Why did object oriented databases fail?

I find it astonishing that:

foo bar = new foo();

bar.saveToDatabase();

Lost to:

foo bar = new foo();
/* write complicated code to extract stuff from foo */
/* write complicated code to write stuff to database */

Related questions:

Are Object oriented databases still in use?

Object Oriented vs Relational Databases

Why have object oriented databases not been successful (yet)?

+2  A: 

Why not?

I guess they were a solution to a problem nobody was having, or not having enough to pay for it.

John Saunders
+8  A: 

Probably because of their coupling with specific programming languages.

Aamir
Good point. Many databases need to be accessed by a wide range of applications.
Meta-Knight
This is why we have CORBA.
Longpoke
+1  A: 

I think a lot of your answer lies in the "Why we abandoned Object Databases" answer of "Object Oriented vs Relational Databases".

As far as your example goes, it doesn't have to be that way. Linq to SQL is actually a quite nice basic layer over a DBMS, and Linq to Entities (v2 -- v1 sucked) will be pretty cool too. (N)Hibernate has been solving the problem you're having for years now using RDBMSes.

So I guess my answer to you is that O/R mappers are getting to the point where they solve your problem nicely, and you don't need an ODBMS to get what you need.

Dave Markle
+1  A: 

Very subjective, but a few reasons come to mind:

  1. Performance has not been as good as relational databases (or at least that's the perception)

  2. Again with performance - relational databases allow you to do things like denormalizing data to further improve performance.

  3. Legacy support for all the non-OO apps that need to access the data.

Eric Petroelje
The Stanford Linear Accelerator Center has apparently the largest database in the world, and it is an object oriented database. Maybe I'm wrong, but to me that indirectly says something about the performance.
Halvard
+3  A: 

I think it is because the problem was solved differently. You might be using a relational database behind the scenes when you are coding in Ruby on Rails or LINQ to SQL, but it feels like you are working with objects.

Jan Aagaard
+5  A: 

Because, as much as ODBMS advertisements were laden with derogatory language about ORM systems, it wasn't that hard to make ORMs do the job, and without all the various hits taken in switching to a pure ODBMS.

What actually happened is that your first code sample won, it just happens to be on a RDBMS persistence layer.

chaos
+6  A: 

First, I don't believe they have "failed" entirely. There are still some around, and they're still used by a couple of companies, as far as I know.

anyway, probably because a lot of the data we want to store in a database is relational in nature. The problem is that while yes, OO databases are easier to integrate into OO programming languages, relational databases make it easier to define queries and, well, relations between the data stored. Which is often the complicated part.

jalf
If I'm coding in an OO language (Java or C#), what data do I have that is relational in nature? Everything is in an object.
Just because everything is an object in your programming language doesn't automatically mean that it should be one in your database as well. you might want to perform queries that don't map directly to the object structure. Or you might have data from several different object models stored into the same database. You might have different objects representing the same data in different applications.
jalf
+4  A: 

There are countless numbers of existing applications out there storing their data in relational databases. This data is the lifeblood of those companies. They have collectively invested huge amounts in storing, maintaining and reporting on this data. The cost and risk of moving this priceless information into a fundamentally different environment is extremely high.

Now consider that ORM tools can map modern application data structures into traditional relational models, and you remove pretty much any incentive to migrate to OODBMS. They provide a low-risk alternative to a very costly high risk migration.

skaffman
A: 

Further, OOP and set-based programming are not always very comptatble. Personally, when I started reading about OO databases, I couldn't help but think "Boy, I hope I never have to work on one of those, update 1 million rows out of a 6 million row table and then make sure all appropriate records in other tables get updated as well"

moleboy
+1  A: 

I have been using db4o (an object oriented database) lately on my personal pet projects, just because it is so quick to set up & get going. No need with the itty, gritty details.

That aside, as I see it, the main reasons why they haven't become popular are:

  • Reporting is more difficult on object oriented databases. Related to this, it is also easier to manually look into the actual data in a relational database.
  • Microsoft and Oracle base so much of their business on relational databases.
  • Lots of businesses already have relational databases in place.
  • The IT departments often have relational database expertise.

And, as Jan Aagaard, have pointed out, lately it is because the problem have been solved in a different way, giving programmers the object oriented feel even though they program against a

Halvard