I have been really intrigued since some months ago about how to represent a network, meaning a model of an undirected unweighted graph, a la friendster. Of course there are some ways to do it, but does anyone know some "SQL direct2 way to do it efficiently and handle the kind of operations required, like BFS? How can one make an adjacency table without duplicating all Id's? I kind of solved the problem by stating a rule that any adjacency should always go from the lesser Id Number to the biggest one, meaning that a relationship between nodes 8967 and 4567 would focefully be saved as Id1=4567 Id2=8967 and never backwards. It indeed reduced the number of queries I needed to wun in order to get a depth 4 BFS. Has anyone another approach that could be worked out on SQL, specifically on MySql?