Neo4j vs ArangoDB when simulating a social network

I want to build a social network. (For example, people have other people as friends), and I think that a graph database would do the trick better than a classic database. I would like to store attributes around edges and nodes. They can be json, but I don't care if DB understands JSON.

ArangoDB can also store documents, and Neo4J is just a "graph database".

I would like to have a node an user for every person 2, for example.

Users - [username] β†’ person
Users - [ID] β†’ person

And there is a need for a pointer on the edges. I do not need another database, so it would be nice to save the image (byte array) in the database, maybe even different sizes for each image / video. Also, messages must be stored in the database, etc.

I got that Neo4j better supports a production-independent query language, but I think it’s easier and better to learn the manufacturer standard. Any recommendations on which a database management system is best suited? I will write code in Java (and some Scala).

+7
neo4j arangodb
source share
2 answers

Both ArangoDB and Neo4j are capable of completing the task you have in mind. Both projects have amazing documentation, and getting answers to any of them is easy. Both can be used with Java (although Neo4j can be implemented ).

One thing that can help your decision-making process is that many NoSQL databases solve a much narrower problem than people appreciate.

Sara May wrote an epic blog post about MongoDB using an example with some TV show data. From the summary:

An ideal use case for MongoDBs is even narrower than our television data. The only thing he can do is to store arbitrary JSON fragments.

I believe that Neo4j solves a similarly narrow problem, as evidenced by how widespread the use of Neo4j is with several other data stores.

I don't know that storing images or video is a great idea in ArangoDB or Neo4j. I would like to save it on some other server (e.g. S3) and save the URL of this file to Neo4j / Arango.

Although it is true that you can create queries that only the graph database can respond to , the performance of the graph database for any given query varies wildly and can give you some pretty unexpected results. For example, here's a document from the International Journal of Computer Science and Information Technologies comparing Neo4j with MySQL, Vertica and VoltDB with queries that you would suggest Neo4j would be awesome: Performance comparison

The idea is that a "social network" does not automatically imply superiority or even use of a graph database (especially since GraphQL and Falcor ).

To ask a question about query languages. There is no standard language for graphical databases.

AQL is a query language that provides a unified interface for working with key / value, document and chart data.

Cypher is a graph query language.

The Badwolf query language is a SPARQL-based language for timelines.

These languages ​​exist because they solve different problems. Databases that support them also solve various problems.

Neo4j has an example of "saving the polyglot" on its website:

Using neo4j redis and mongo together

I think that , which is a problem that ArangoDB and AQL cannot solve, the hypothesis is that you can solve this without being worse than specialists like Neo4j. It still looks like it might be right .

+23
source share

I don’t understand why you want to identify the model name and identifier separately from the user? These are simply user-owned properties. You prefer to simulate connections to other users, messages or likes, etc. As a reference.

eg..

(:User {name:"Florian",id:12})-[:KNOWS]->(:User {name:"Michael",id:3}) 

Why do you need an index for relationships? Neo4j may not be optimal for storing images, but people have done this in the past, but unfortunately there was no video.

You can use Neo4j from both Java and Scala, see http://neo4j.com/developer/language-guides

NTN

+1
source share

All Articles