I've been working with some large datasets on MySQL but I find modelling them as graphs easier to work with. So I started experimenting with Neo4j and lately, so I want to know what others use these graph databases for.
I've been sticking my feet in the graph database waters for a while, and I find them really compelling.<p>As a rule of thumb, here's how I think of the differences:<p>Graph databases are optimized for joins. Relational databases are optimized for selects.<p>Easy use cases:<p>Tagging systems where you're tagging million of items.<p>Social graphs, and "friending" people are an easy slam dumk for a graph database.<p>I'm convinced that a graph database is the secret to Linked In's success. Their ability to quickly identify first, second and third order connections are a graph problem, and become a lot easier when you're built on top of a graph database.<p>Commenting systems like HN's commenting system, where a threaded comment ordering is based on frequently changing scores is a giant pain in the ass trying to model in a relational database. That's why most commenting systems are date based. That only requires a single SELECT statement in a RDMS. I know because I built my own, and it was a giant pain, and required modeling a tree structure in a RDMS. HN's commenting system works well because comments on HN are modeled as an S expression tree, and kept in memory. Only occasionally are they serialized and written to disk for permanent storage. I'm convinced that the underlying tree structure is the reason that there hasn't been much innovation in commenting systems for the last decade.<p>Real time recommender systems can be modeled easier in graph structures.<p>Anything semantic web related will probably be modeled in a Graph database easier than in a Relational Database.<p>Also, for further reference, look at Dydra[1] and Directed Edge[2].<p>If you're interested, ping me and I can probably put you in contact with the Neo4j team. They're really responsive to questions like this.<p>ref:<p>[1] <a href="http://dydra.com/" rel="nofollow">http://dydra.com/</a><p>[2] <a href="http://www.directededge.com/index.html" rel="nofollow">http://www.directededge.com/index.html</a> <a href="http://www.directededge.com/products.html" rel="nofollow">http://www.directededge.com/products.html</a>
I wrote a peer-to-peer credit server in Neo4j and Ruby: <a href="https://github.com/jplewicke/rivulet" rel="nofollow">https://github.com/jplewicke/rivulet</a> . There were two reasons I used Neo4j: I needed to be able to quickly find paths to route payments along, and I needed to be able to update properties on multiple edges as an atomic action.