title: Multiple foreign keys depending same primary key
body: <p>Let's say that I have a web app that uses SQL Server as database.</p>
  
  <p>I have one table that has 2 foreign keys that contain the same value from other table,</p>
  
  <p>Table <code>Sections</code> </p>
  
  <pre><code>IDdepartment, IDstore, codTax, accountSell, accountTax, status, m1, m2
  
  -&gt; PK (IDdepartment, IDstore, codTax)
  FK (accountSell, accountTax) on AccountPlan (accounCompany)
  </code></pre>
  
  <p>Table <code>AccountPlan</code> </p>
  
  <pre><code>AccountCod, account, description, account_desc, accountCompany, type, mov) 
  
  -&gt; PK (accountCompany)
  </code></pre>
  
  <p><code>accountSell</code> and <code>accountTax</code> depend on <code>accountCompany</code>. Both can contain all values available in <code>accountCompany</code>.</p>
  
  <p>When I'm doing a query, I want to know the description of that <code>accountCompany</code>, how to accomplish this?</p>
  
  <p>Actually I'm using two tables with duplicated data, I think that is possible to have only one table to do the same. Hope that can be possible.</p>
  
  <p>Thanks...</p>