title: Designing lossless-join, dependency preserving, 3NF database
body: <p>I need to design database which would keep track of the following attributes:</p>
  <pre><code>stdnum       // student number
  postcode     // postal code
  phone_number // student phone number
  city         // student address: city
  </code></pre>
  <p>Also listed are functional dependencies:</p>
  <pre><code>stdnum -&gt; postcode
  stdnum -&gt; phone_number
  postcode -&gt; city
  phone_number -&gt; city
  </code></pre>
  <p>I need to find a lossless-join, dependency preserving, 3rd normal form decomposition.</p>
  <p>I have tried different decompositions but there was no one that obeys all requirements (they are: lossless-join, dependency preserving, 3rd normal form).<br />
  E.g. if I leave the original relation without changes (table would have all 4 attributes) I would get lossless-join and dependency preserving but not 3NF, only 2NF.</p>
  <p>The decomposition<code>(stdnum, postcode, phone_number) JOIN (postcode, city) JOIN (phone_number, city)</code> is in 3NF and dependency preserving, but not lossless-join.</p>