Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>1NF bans repeating lists in a row. Your design violates this, and so would the following design:</p> <pre><code>Student Phones 'John D' '555-5555, 666-6666, 777-7777' 'Sally S' '111-1111, 222-2222' </code></pre> <p>The following design would violate 2NF, because the only primary key is <code>Name, Phone</code>, but the <code>Address</code> attribute does not depend on the <code>Phone</code>:</p> <pre><code>Name Phone Address 'John D' '555-5555' '1 Square Village' 'John D' '666-6666' '1 Square Village' 'John D' '777-7777' '1 Square Village' 'Sally S' '111-1111' '999 Flash City' 'Sally S' '222-2222' '999 Flash City' </code></pre> <p>The next design would violate 3NF, because AreaName does not depend on Name, but only on Area:</p> <pre><code>Name Area Phone AreaName 'John D' '555' '5555' '111name' 'John D' '666' '6666' '666name' 'John D' '777' '7777' '777name' 'Sally S' '111' '1111' '111name' 'Sally S' '222' '2222' '222name' </code></pre> <p>Even if your design violates 1NF, it's an excellent choice. The complexity of adding a <code>PhoneNumber</code> table is hardly ever justified. </p> <p>Think about how hard an update to a customer becomes if you conform to 1NF. The numbers would be in a separate table. So if someone submits a form with an updated list of phone numbers, how would you change the database? First you'd have to retrieve the existing list of numbers. Then you'd have to compare them to the submitted list. Then you'd have to delete or insert rows based on the difference. One heck of a complex solution.</p> <p>If you stick to your solution, you can just update the three columns. The saved time can be spend on real features! Or even writing long answers on Stack Overflow.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload