Object oriented vs. object relational database difference

ps-aux picture ps-aux · Jun 16, 2014 · Viewed 25.8k times · Source

I have been reading about database models and still do not understand what are the fundamental differences between object oriented and object relational models.

I learned so far that object relational database is a relational database also which supports objects. What makes object-oriented database different? (aside from not supporting relational model).

Is the difference also in object-oriented database giving the objects methods - behaviour (like in OO programming languages) while object-relational database only treats them as a structures with attributes and references to other objects? If so, how does one uses these object methods in OO databases?

Answer

usr picture usr · Jun 16, 2014

The two kinds are quite similar: Classes map to tables. Columns map to fields. Instances map to rows. Object references map to foreign keys. In fact, ORMs try to map the two models as closely as possible. They are quite successful with that.

The difference is mostly in the way the database is used. The difference is in "style" and in the patterns that are used.

Object databases are basically used like you would use an ORM on top of a relational database. You can directly store objects (or object graphs) into the database without the need to write an INSERT statement. The interface is often not SQL.

It is hard to differentiate the two because they are so similar. Please leave a comment if you are interested in certain (concrete) aspects.