News for hackers. Stuff that matters.
Re:Graphs in the database: SQL meets social networks by mee_k on Friday March 16, 2012 @06:07AM (#3712643)
Looks like their database couldn't handle the traffic of a non-social network...

The webpage at http://techportal.ibuildings.com/2009/09/07/graphs-in-the-da... might be temporarily down or it may have moved permanently to a new web address.

Googlecache:

http://webcache.googleusercontent.com/search?q=cache:b6OLx7s...

Re:Graphs in the database: SQL meets social networks by stevencorona on Friday March 16, 2012 @10:56AM (#3713558)
If you're storing something like followers or friends, a solution like Redis, Neo4J, Cassandra, etc is likely a better (and simpler to implement) choice.
Re:Graphs in the database: SQL meets social networks by nikcub on Friday March 16, 2012 @08:26AM (#3712986)
Twitter does this. Flockdb is built ontop of an RDBMS

http://github.com/twitter/flockdb

the downside is that unlike a proper graph database (such as neo4j) you can only query a single hop per SQL query (which is fine for twitter, since there is no requirement for 'followers of followers' etc.)

Re:Graphs in the database: SQL meets social networks by einhverfr on Friday March 16, 2012 @09:20AM (#3713144)
I thought their use of WITH RECURSIVE in the demos on the article linked was interesting. It should allow you to recurse to an arbitrary depth. The only problem there is that if you don't set a max depth in your recursive query and you have a closed cycle.... you might end up with an infinite loop.......
Re:Graphs in the database: SQL meets social networks by PaulHoule on Friday March 16, 2012 @09:03AM (#3713094)
Neo4J is proper?

What I see is that Neo4J attracts noobs and leaves behind a trail of tears and failed projects.

Something like OWLIM or Virtuoso Open Link handles databases that are 20x bigger.

Re:Graphs in the database: SQL meets social networks by espeed on Friday March 16, 2012 @11:03AM (#3713585)
You can represent a graph in just about any data structure.

The key thing that separates a graph database like Neo4j (http://neo4j.org) from a graph represented in a relational database is that in a real graph database, relationships between nodes are explicitly connected so you don't have any overhead from external index look ups during traversals.

Index look ups also degrade the bigger the index gets in a relational database, whereas in a directly connected graph, it doesn't matter how many other nodes or relationships there are in the graph, performance stays constant -- Neo4j for example does about 2 million traversal steps per second (a traversal step resembles a join in a RDBMS).

Re:Graphs in the database: SQL meets social networks by 3pt14159 on Friday March 16, 2012 @12:00PM (#3713832)
2 million a second? That must be with cached data, no way it's picking up from disk that fast, even in the case where it has all the data lined up.

Edit:

I'm not saying you are wrong, I'm curious to see if they can do it and what I can learn from it.

Re:Graphs in the database: SQL meets social networks by espeed on Friday March 16, 2012 @12:45PM (#3714046)
Re:Graphs in the database: SQL meets social networks by PaulHoule on Friday March 16, 2012 @09:02AM (#3713093)
I switched to a real graph database when I needed to implement transitive closure, opened up the algorithms book, and figured it would be more trouble to implement myself than deal with the BS for a new product.
Re:Graphs in the database: SQL meets social networks by Omnipresent on Friday March 16, 2012 @10:44AM (#3713503)
This is a brilliant article. Are there other resources that go in as much depth as this article but aren't really stuck to RDBMS? What's the standard to doing graphs like these (linkedin/facebook)? RDBMS or a document oriented DB?
Re:Graphs in the database: SQL meets social networks by EzGraphs on Friday March 16, 2012 @11:10AM (#3713608)
If you mean SQL specific resources, Joe Celko (who's book "SQL for Smarties" was mentioned in the article) has written a good deal. He generally expresses himself using ANSI Standard SQL (and served on the standards committees). But I think that the various NoSql solutions are far more popular for large scale implementations like LinkedIn/Facebook.
Re:Graphs in the database: SQL meets social networks by Omnipresent on Friday March 16, 2012 @11:15AM (#3713628)
Yeah, thats what I thought that NoSql solutions like mongoDB etc. would be better suited for this purpose. However, I haven't come across a resource from NoSql side that goes in depth of explaining how to really implement: How you are connected with a certain person. etc.
Re:Graphs in the database: SQL meets social networks by obtu on Friday March 16, 2012 @12:53PM (#3714083)
Look at graph databases. These are very different from document stores or KV stores (NoSQL doesn't imply any commonality), though a KV store or something like HadoopFS might be used as a storage layer. They have their own challenges to scale up.
Re:Graphs in the database: SQL meets social networks by ot on Friday March 16, 2012 @09:38AM (#3713222)
The website is down

> Error establishing a database connection

Quite ironic, considering the title

Re:Graphs in the database: SQL meets social networks by willvarfar on Friday March 16, 2012 @06:26AM (#3712685)
When I go there I just told that the database is unavailable ;)

F5 and eventually it worked for me