Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What values are allowable for properties in graph databases (i.e. Titan, OrientDB, ArangoDB, Neo4J)?

I'm pretty new to the NoSQL scene. I'm trying to understand the capabilities and differences between different graph databases. My understanding is that Orient and Arango use documents as vertices (and edges too, right?). I know that in Titan and Neo that vertices and edges may have properties and that these properties are key:value pairs. It makes sense to me that you might limit the values to primitives (though I don't know that this is strictly the case). I'm wondering just what you can have as a value. Can your value be an array of primitives? Can it be another hash? etc. If the values are rather unrestricted then I wonder how Titan or Neo really differ from Orient and Arango with respect to the ways in which you can structure your data.

edit: People are asking about my use case -- My company has developed a toolchain that creates a working applications (GUI and database) from UML models...in seconds. We use these tools to model a number of different domains (whatever a customer comes to use with) and develop solutions for them. Right now the tooling uses an ORDBM. This has its drawbacks, some of which are showstoppers if my thoughts on how we should evolve mean anything. I'm trying to do my due diligence in exploring alternatives. I can accept that nothing is perfect and that whatever we choose won't be the optimal choice for every customer's use case. Because of the automation involved we may not necessarily take advantage of every feature a particular db offers either on a case by case basis. So, I suppose I'm trying to decide which db would be a good fit for our tooling. (Note also that the original question posed here is just one of many deciding factors.) Oh yea, FWIW, we do Ruby. We could shift to maybe Python or Groovy or something else but it would be far from trivial to do so.

like image 320
Huliax Avatar asked Feb 16 '23 05:02

Huliax


2 Answers

ArangoDB uses documents as vertices and edges. So, it can be as simple as a key/value pair or as complex as documents with sub-documents or lists of documents. It really depends on your case, what is suitable for you. Maybe you can explain your use-case in more details.

like image 95
fceller Avatar answered Apr 06 '23 23:04

fceller


Neo4j uses property graphs, vertices(nodes) and edges(relations) can both have properties which are key value pairs. Neo4j supports primitives, Strings and arrays of these.

http://docs.neo4j.org/chunked/stable/graphdb-neo4j-properties.html

How you structure or model your data really depends on what kind of information you want out of the graph- sometimes a property will suffice, sometimes it makes sense to represent it as a node instead. Do you have a specific use case in mind?

like image 24
Luanne Avatar answered Apr 06 '23 21:04

Luanne