Neo4j is a graph database written in Java by an eponymous company. A graph database is one that represents data in terms of nodes and relationships between the nodes. This allows for very deep hierarchies and for modeling relationships between objects very easy. The engine itself stores related objects near each other to optimize retrieval.

This specific DB runs on both Linux and Windows, and it uses JSON to represent data. One thing I appreciated was the Web UI which had some basic admin features as well as a way to execute queries. I did not appreciate the lack of working, production-quality samples, but I suppose no product is complete.


Neo4J is incredibly easy to install and run. I simply downloaded it in Windows 7, and started the bat file. The application takes a while to startup, but it was fine after that. Nothing special was required to configure it.

The client

So I do have to lodge a complaint against the company who released this. Considering that it was written in Java, I would expect a Java client. No such luck. I had to implement the basic CRUD functionality for both nodes and relationships, and trust me I was not happy about this. Once again, someday I hope to release the source code, but I really need to make it more abstract and write more tests.

The implementation

The only difficult part was translating non-connected objects into graphs. It took me more time than with some of the other databases, but probably not as much as Oracle. The trouble with traversal is that I have an n+1 problem in that I have to keep going back to get related nodes. I am probably missing a way of doing this better, but I could not find the documentation.

The test

It ran without much work, but it had something that no other DB had: errors. I don’t know what went wrong, but every once in a while, a read would fail. Que horror!

The conclusion

This product has some interest for me in that has a very different model than any other NoSQL DB. However, it does not have polish or ease of use that other systems had. I wish it had better documentation and a Java native client. I also wish there were no n+1 issues. Would I recommend this? No, but I will keep my eye on it. If they fix these problems, I think it would be a very fascinating system to try.