Get the latest tech news
Degrees of Kevin Bacon Using Postgres
Paul Ramsey has some great examples of Postgres network analysis and graph theory in this sample code for playing the Kevin Bacon game. Both pgRouting and recursive CTE are used to solve graphing relationships.
Back in the 1990s, before anything was cool (or so my children tell me) and at the dawn of the Age of the Meme, a couple of college students invented a game they called the " Six Degrees of Kevin Bacon". In our modern age we don't need to be smart, we can attack the Bacon Number problem by combining data and algorithms. The IMDB database files actually include information about every job on a film (writers, directors, producers, casting, etc, etc) and we are only interested in actors for the Kevin Bacon game.
Or read this on Hacker News