I need to represent graph information with database.
Let's say, a is connected to b, c, and d.
a -- b
|_ c
|_ d
I can have a node table for a, b, c, and d, and I can also have a link table (FROM, TO) - (a,b), (a,c), (a,d).
For other implementation there might be a way to store the link info as (a,b,c,d), but the number of elements in the table is variable.
Q1 : Is there a way to represent variable elements in a table?
Q2 : Is there any general way to represent the graph structure using database?