title: Interesting tree/hierarchical data structure problem
body: <p>Colleges have different ways of organizing their departments.  Some schools go <code>School -&gt; Term -&gt; Department</code>.  Others have steps in between, with the longest being <code>School -&gt; Sub_Campus -&gt; Program -&gt; Term -&gt; Division -&gt; Department</code>.  </p>
  
  <p><code>School</code>, <code>Term</code>, and <code>Department</code> are the only ones that always exist in a school's "tree" of departments.  The order of these categories never changes, with the second example I gave you being the longest.  Every step down is a 1:N relationship.  </p>
  
  <p>Now, I'm not sure how to set up the relationships between the tables.  For example, what columns are in <code>Term</code>?  Its parent could be a <code>Program</code>, <code>Sub_Campus</code>, or <code>School</code>.  Which one it is depends on the school's system.  I could conceive of setting up the <code>Term</code> table to have foreign keys for all of those (which all would default to <code>NULL</code>), but I'm not sure this is the canonical way of doing things here. </p>