OrientDB Graph database vs Document database

132 views
Skip to first unread message

Newbee to OrientDB

unread,
Apr 23, 2015, 9:14:49 AM4/23/15
to orient-...@googlegroups.com
Hey guys, in the orient-db documentation (http://orientdb.com/docs/last/Tutorial-Java.html) The Graph API is marked as suggested. Is there a reason for that ? Does this mean that it's always better to always use a Graph database ? Is a Graph database in OrientDB exactly the same as a Document database plus graph features ?

Colin

unread,
Apr 23, 2015, 10:04:59 AM4/23/15
to orient-...@googlegroups.com
The reason it's suggested is because it can do everything the Document API can do plus adds all the capabilities and benefits of using a graph.

However, it's completely possible to use the Graph API to store document-type records and never once create a connection (edge).

Having said that, you can also use the Document API with links to other records, you just have to maintain the connections yourself.

Something to note, the Graph API automatically uses a transaction and will save your properties when they are set.

The Document API requires you to begin a transaction, and you have to call save() explicitly after you modify fields.

Hope that helps.

-Colin

Orient Technologies

The Company behind OrientDB

Simer P

unread,
Apr 23, 2015, 8:07:06 PM4/23/15
to orient-...@googlegroups.com
The other difference of using a Document API instead of Graph API would be sharding right ?

It's easier to Shard a Document database then a Graph database. But like you said "we can also use the Document API with links to other records" which means we can have same Graph connections in a Document database and run into the same problem of easy ID based or range based Sharding. Am I right ? 



--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/YuTaFqEvzHw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Colin

unread,
Apr 27, 2015, 11:24:03 AM4/27/15
to orient-...@googlegroups.com
Would you mind clarifying your interpretation of sharding and OrientDB?

Both the Document and Graph APIs make use of the database's class and cluster elements.  Having multiple clusters for a class is where the sharding comes into play.

Regards,

-Colin
Reply all
Reply to author
Forward
0 new messages