Which graph database should I use when dealing with a couple of thousand nodes and a couple of thousands relationships? Are these big numbers for any database or not? Which graph database is the fastest at read operations (assuming all data is loaded once at the beggining). I had a look at neo4j and its visualization tool. Will I be able to have such a visualization tool in my application?
1 Answers
The questions you'll need to ask and answer for a graph database are similar to any other database. How much data? In memory or persistent? How will you interface with it? Embedded or a server process? Distributed or localized? Licensing?
A couple of thousand nodes and relationships is small for a graph database and most any graph database solution will work. For most people Neo4j is a fine choice, but there are some caveats. First, the licensing of Neo4j can be problematic in many situations. Secondly, the visualizer is part of the Neo4j server process - which means you're going to have another server process running. If you're concerned about the licensing you may want to check out OrientDB, which is under the Apache license, and thus very flexible.
From the sounds of it, you have a fairly small system and may be able to get by with using TinkerGraph, an in-memory graph database from Marko Rodriguez and the Tinkerpop hackers. It has the option to persist your data to a file if needed, is amazingly lightweight, and, like Neo4j and OrientDB, supports all the graph tools from the Tinkerpop stack, including the Jung Ouplemntation, which can give you the visualizations you desire.

- 4,883
- 4
- 30
- 47
-
1Guys, we are looking into more flexible startup licensing, contact me (I am part of the Neo4j team) if you need to get going the Neo4j. Also, Tinkerpop is included and compatible with Neo4j, adn the visualizer in the Neo4j Server component is just a default, Arbor.js based visualization that runs against the REST API and is driven by browser threads (not in process with the server). For small graphs, I think an in-memory model like Tinkergraph is totally fine. – Peter Neubauer Feb 08 '12 at 11:24
-
@Pridkett About the licensing of Neo4j: I've seen that Neo4j comes with GPL and AGPL license. What problems does this bring over Apache license? ... I will have a look at TinkerGraph.. The amount of data is as I said a few thousand nodes with not many properties and a few thousand relationships. It will be a localized server process with a web interface front-end. I don't know if its going to be in-memory or persistent. What are the pros and cons? Should the size of the db determine this? – user579674 Feb 11 '12 at 13:47
-
@PeterNeubauer I need some help in deciding if neo4j can do what I have in mind. Is there a way I can contact you privately? My questions are basically related on how to get started using neo4j as a backend database in a webpage. – user579674 Feb 18 '12 at 12:50
-
peter.neubauer@neotechnology.com – Peter Neubauer Feb 27 '12 at 11:13