Should we store everything in graph database or store object ids with relationships on the graph database and object properties on NoSQL or Relational DB?
-
I feel like GDBs are for traversalĀ and others are for storage. But combining these two is problematic asĀ well due to consistency. The lack of primary key in Neo4j is another thing that pushes me to combining two databases.
-
Answer:
Most of the applications that I have seen are using Graph database (Neo4J) in addition to a RDBMS that is the main database of the application. I am not saying that it is the "best/only" way but it is for sure the most common approach, since you want to focus on the GraphDB to do powerful query/navigation between ids. I remember a presentation from Viadeo one of Neo4J customer that use MySQL as main database and Neo4J to manage all the relationship in the social network. The synchronization/calculation of the graph was done in a batch mode and the eventual consistency between the RDBMS and Neo4J is not an issue.
Tugdual Grall at Quora Visit the source
Other answers
We ended up using Neo4j as an "index" to do routing calculations (in a bus/train search). The bulk of the data was stored in MongoDB. We used MongoConnector as a way to sync the two databases.We tried to store "everything" in Neo4j initially, but then queries started to take +2 mins, so afterward we only stored the minimal data necessary. In addition, Neo4j has limitations on the what you can index. For example, they don't have "date" type, so range queries on dates are cumbersome. Also you run into problems when you have a "super node", a node with thousands or hundred of thousands of links (relationships). Relationships are stored as a link list, so random access is very slow (for looking up relationships).So you have to be picky how you use Neo4j, in the end we used it for shortest path calculations/search, which is Neo4j's strength.For more details checkout a video and presentation of our findings:http://www.slideshare.net/neo4j/wanderu-lessons-from-building-a-travel-site-with-neo4j-eddy-wong-graphconnect-ny-2013 https://vimeo.com/79477603
Eddy Wong
Related Q & A:
- How to store multiple Images in database?Best solution by Stack Overflow
- How to store an image in database using MySQL?Best solution by stackoverflow.com
- Object reference not set to an instance of an object; null?Best solution by Stack Overflow
- How to dynamically create object properties from an array in Javascript?Best solution by nfriedly.com
- How to sort the Object{} properties?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.