News for hackers. Stuff that matters.
Re:NoSQL is a Premature Optimization by vyrotek on Saturday July 23, 2011 @12:47PM (#2797235)
This is so much simpler than messing with joins in a relational database

I disagree. I have no idea what you just said and I'm sure I could figure out the join faster than trying to figure it out.

Re:NoSQL is a Premature Optimization by espeed on Saturday July 23, 2011 @01:07PM (#2797278)
In graph speak, vertices are nodes (or objects) in the graph and edges are the links between nodes -- it's really quite easy once you become familiar with it.

This script will return a list of all the user's friends:

   g.v(user_id).outE('friend').inV
All you're doing is starting with the user node v(user_id) and following the outgoing links that are labeled "friend" to the adjacent nodes (the "incoming vertices").

In a graph, each "edge" (each link) has an outgoing vertex and an incoming vertex. The outgoing vertex is where the edge starts from, and the incoming vertex is what the edge points to:

  outgoing_vertex -- edge("friend") --> incoming_vertex
Here's a more concrete example...

  james -- "friend" --> julie
In this example, "james" is the outgoing vertex, "julie" is the incoming vertex, and they are linked together by an edge labeled "friend".

Again "vertex" means the same thing as node so every user in the graph is a node (a vertex).

Re:NoSQL is a Premature Optimization by vyrotek on Saturday July 23, 2011 @02:56PM (#2797521)
Thanks for the explanation.

it's really quite easy once you become familiar with it

This was really my point. Things are always simpler when you're familiar with it and I happen to be very familiar with SQL. I just don't think ease should be a highlighted feature of NoSQL.

Don't get me wrong though. I use a few NoSQL systems in my company. But I didn't pick them because they were easy to understand.