title: Storing & Querying Heirarchical Data with Multiple Parent Nodes
body: <p>I've been doing quite a bit of searching, but haven't been able to find many resources on the topic. My goal is to store scheduling data like you would find in a Gantt chart. So one example of storing the data might be:</p>
  
  <pre><code>Task Id | Name    | Duration
  1         Task A    1
  2         Task B    3
  3         Task C    2
  
  Task Id | Predecessors
  1         Null
  2         Null
  3         1
  3         2
  </code></pre>
  
  <p>Which would have Task C waiting for both Task A and Task B to complete.</p>
  
  <p>So my question is: What is the best way to store this kind of data and efficiently query it? Any good resources for this kind of thing? There is a ton of information about tree structures, but once you add in multiple parents it becomes hard to find info. By the way, I'm working with SQL Server and .NET for this task.</p>