Tuesday, 28 May 2013

Graphs and relationships everywhere


Wasn't easy but managed to find the place where the Neo4J meetup was held. Obviously when left the office I managed to travel a huge a circle in the city just to get 100m away from where I've left. That's especially promising when you are listening to a graph related presentation.


Back to seriousness, it was awesome. There was a circa 2 hour long presentation where the presenter introduced the concept, from basics to the secrets and tons of examples. The thing is, it changed the way I think about graph databases. It's not only about a relationship heavy document store. It's a different way of thinking of data. You must have an idea what is a connection, or let's call it relationship. Like human A has a friend human B. Or fat has color white. One directional rich relationships that we're talking about. So that's just the beginning. All relationships can has any amount of properties. And relationship can be anything. Like a year has months. Each month is a relationship. And a month has days. Or a human can has height, which can has a value. It all sounds as we would abuse the system. Actually it opens new ways of querying data. And that's quite brilliant.

I just started to write a connector module to Drupal. The idea is very initial but I'm curious about the benefits. Imagine you have glob-loads of nodes, each has quite some references to users and other nodes. At the same time they apply tons of fields. Now on each cruds we update the graph schema. Fields, nodes, references all to nodes and relationships.
And now imagine asking graph questions, such as: 'Show me all content that are referencing to similar items that this node has.', or 'What A type node refers (any depth) to these properties.'.

Well, I'm out of creativity, but trust me there are interesting computation heavy questions you can solve much better with it.

---

Peter

No comments:

Post a Comment