I'm trying to store an unweighted, directed graph of over 5GB in a MySQL database in an efficient way for finding shortest paths. Currently it is stored in a single table with a column source and a comlumn targets (comma seperated), but I am getting the feeling this isn't the way to go so I am planning on converting it to a table with vertices and a table with edges.
I've got two questions:
- What is the best way of storing the graph?
- What shortest path algorithm should I use?