Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using both graph db and document db

I'm considering a setup where I have entities stored both in a document db (e.g. CouchDB) and a graph db (e.g. Neo4j). The rationale is storing each entity information (data, blobs, values, complex internal structure) in the document db while storing the entity relations (parents, children, associated entities) in the graph db.

Has anyone done / seen / been bitten by a setup like this? What kind of issues should I expect? First thing that come to mindaka the 2-phase commit. But backups are problematic too here.

like image 636
Ran Biron Avatar asked Aug 30 '12 03:08

Ran Biron


People also ask

What are graph databases not good for?

Graph databases are not as useful for operational use cases because they are not efficient at processing high volumes of transactions and they are not good at handling queries that span the entire database.

Is graph databases better than relational databases?

Complex queries typically run faster in graph databases than they do in relational databases. Relational databases require complex joins on data tables to perform complex queries, so the process is not as fast.

Is Neo4j a document database?

Neo4j is an OLTP graph database which excels at querying data relationships, which is a weakness of other NoSQL and SQL solutions. We created the Neo4j Doc Manager for Mongo Connector to allow MongoDB developers to store JSON data in Mongo while querying the relationships between the data using Neo4j.

When should I use a graph database?

Graph databases have advantages for use cases such as social networking, recommendation engines, and fraud detection, when you need to create relationships between data and quickly query these relationships. The following graph shows an example of a social network graph.


1 Answers

You may check out the book "Seven DBs in Seven Weeks". 8th chapter talks about building up a polyglot structure via CouchDB, Neo4j and Redis.

like image 151
VolkanT Avatar answered Oct 20 '22 10:10

VolkanT