title: representing graph using relational database
body: <p>I need to represent graph information with relational database.</p>
  
  <p>Let's say, a is connected to b, c, and d. </p>
  
  <pre>
  a -- b
  |_ c
  |_ d
  </pre>
  
  <p>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. </p>
  
  <ul>
  <li>Q1 : Is there a way to represent variable elements in a table?</li>
  <li>Q2 : Is there any general way to represent the graph structure using relational database?</li>
  </ul>