<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23569">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hello all</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>There is one extra component to 1NF that I feel
needs to be stated explicitly.The table must have a primary key; that is, a
column or group of columns which uniquely identify a given row. This is
important because without reference to a primary key, 2NF and 3NF are not
possible.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>And the definition about 'there may only be one
datum' is correct as far it goes, but "16 Fred Street Melbourne 3000" can be a
single datum. It depends on the design needs of the db.</FONT></DIV>
<DIV><FONT size=2 face=Arial>It many ways I find it best to incorporate some of
OO terminology - a column is equilvalent to a class, and any individual field in
the column can only contain one instance of that class.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>So, for example, if the column were "address" and
address was defined as "street address + suburb + post code" then "16 Fred
Street Melbourne 3000" is one datum (one instance of the class
'address').</FONT></DIV>
<DIV><FONT size=2 face=Arial>Whether 'address' is further split or not has to do
with search requirements, not normalisation.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>So</FONT></DIV>
<DIV><FONT size=2 face=Arial><STRONG>name
phone</STRONG></FONT></DIV>
<DIV><FONT size=2 face=Arial>fred smith 345678000</FONT></DIV>
<DIV><FONT size=2
face=Arial> 543265465</FONT></DIV>
<DIV><FONT size=2 face=Arial>suzy lang 101010101</FONT></DIV>
<DIV><FONT size=2 face=Arial>(primary key = name) is NOT 1NF (repeated phone
number, or two instances of phone number in the same row)</FONT></DIV>
<DIV><FONT size=2 face=Arial>and</FONT></DIV>
<DIV><FONT size=2 face=Arial>
<DIV><FONT size=2 face=Arial><STRONG>name
phone1 phone2</STRONG></FONT></DIV>
<DIV><FONT size=2 face=Arial>fred smith
345678000 543265465</FONT></DIV>
<DIV><FONT size=2 face=Arial>suzy lang
101010101</FONT></DIV></FONT></DIV>
<DIV><FONT size=2 face=Arial>(primary key = name) is NOT 1NF (different column
names, but still two instances of the same class of data)</FONT></DIV>
<DIV><FONT size=2 face=Arial>but</FONT></DIV>
<DIV><FONT size=2 face=Arial>
<DIV><FONT size=2 face=Arial><STRONG>name
phone</STRONG></FONT></DIV>
<DIV><FONT size=2 face=Arial>fred smith 345678000</FONT></DIV>
<DIV><FONT size=2 face=Arial>fred smith 543265465</FONT></DIV>
<DIV><FONT size=2 face=Arial>suzy lang
101010101</FONT></DIV></FONT></DIV>
<DIV>
<DIV><FONT size=2 face=Arial>(primary key = name+phone) IS 1NF (no repeating
groups, but the primary key has to be extended. In a 'real db, because there
could be many fred smiths and suzy langs, we would have a single ID field as a
primary key, and because we most probably want to search on family name, we
would probably split the name field)</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Regards</FONT></DIV>
<DIV><FONT size=2 face=Arial>Robert T-A</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV></DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=mark@vceit.com href="mailto:mark@vceit.com">Mark</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=itapps@edulists.com.au
href="mailto:itapps@edulists.com.au">Year 12 IT Applications Teachers' Mailing
List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, November 05, 2014 9:39
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Year 12 IT Apps] First
Normal Form</DIV>
<DIV><BR></DIV>
<DIV dir=ltr>Hi Stephanie. Now you know why I bailed out when I did :-)
<DIV><BR></DIV>
<DIV>1NF is easy:</DIV>
<DIV> - there must be no repeated columns (fields) e.g. Contact person 1,
Contact person 2, Contact person 3.</DIV>
<DIV> - there may only be one datum in any field - i.e. no "16kg" "3
minutes 56 seconds", "Large Size $4, Small $2.50", "16 Fred St, Melbourne,
3000".</DIV>
<DIV><BR></DIV>
<DIV>2NF problems ONLY arise if you're silly enough to use a multi-field key
(e.g. using firstname & familyname to uniquely identify people in a
table). </DIV>
<DIV>2NF problems never even arise if each table has its own dedicated key
field (e.g. ID, account number). </DIV>
<DIV><BR></DIV>
<DIV>But anyway, kids are expected to know 2NF.</DIV>
<DIV><BR></DIV>
<DIV>2NF requires:</DIV>
<DIV>- 1NF has already been achieved.</DIV>
<DIV>- Any non-key field in a table is dependent on ALL of the fields used as
the primary key.</DIV>
<DIV><BR></DIV>
<DIV>As usual, this means as little as American football, so an example is
needed.</DIV>
<DIV><BR></DIV>
<DIV>There's a table with the following fields. 1NF has already been
achieved.</DIV>
<DIV><BR></DIV>
<DIV>StudentID</DIV>
<DIV>SubjectID</DIV>
<DIV>Mark</DIV>
<DIV>SubjectName</DIV>
<DIV><BR></DIV>
<DIV>e.g. (Hope the formatting is not mangled - wish I could insert a
table)</DIV>
<DIV><FONT face="courier new, monospace"><B>STUDENTID SUBJECTID
Mark SubjectName</B></FONT></DIV>
<DIV><FONT face="courier new, monospace">SMI0001 ENG
A+ English</FONT></DIV>
<DIV><FONT face="courier new, monospace">SMI0001 MA
B Maths</FONT></DIV>
<DIV><FONT face="courier new, monospace">FRE0002 ENG
C English</FONT></DIV>
<DIV><BR></DIV>
<DIV>The table's key is STUDENTID and SUBJECTID (together) to uniquely
identify each record in the table.</DIV>
<DIV><BR></DIV>
<DIV>The (non-key) MARK field is dependent on both STUDENTID and SUBJECTID -
i.e. to find out what a mark refers to, you need to know both the student and
subject.</DIV>
<DIV><BR></DIV>
<DIV>However, the (non-key) SUBJECTNAME field is dependent only the SUBJECTID
- i.e. to find out what a subject name refers to, you only need the SUBJECTID.
You don't need the STUDENTID.</DIV>
<DIV><BR></DIV>
<DIV>So the (non-key) SUBJECTNAME field is dependent on <B>part of</B> the key
(SUBJECTID) but not the <B>whole</B> key (STUDENTID+SUBJECTID).</DIV>
<DIV><BR></DIV>
<DIV>So it fails 2NF.</DIV>
<DIV><BR></DIV>
<DIV>To fix the problem, the table must be broken into two - </DIV>
<DIV>- MARKS_TABLE with STUDENTID+SUBJECTID as its key. It also contains the
MARK non-key field.</DIV>
<DIV>- SUBJECTS_TABLE with SUBJECTID (primary key) and non-key
SUBJECTNAME.</DIV>
<DIV><BR></DIV>
<DIV>You then create a relationship between the MARKS table and the SUBJECTS
table using their primary keys as the related fields.</DIV>
<DIV>Now, in the MARKS table, a Mark is dependent upon the entire key in its
table (STUDENTID+SUBJECTID).</DIV>
<DIV>In the SUBJECTS table, a subject name is dependent on the entire key in
its table (SUBJECTID).</DIV>
<DIV><BR></DIV>
<DIV>Bingo. 2NF.</DIV>
<DIV><BR></DIV>
<DIV>Hope that helps.</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV><BR></DIV></DIV>
<DIV class=gmail_extra><BR>
<DIV class=gmail_quote>On 5 November 2014 08:53, Stephanie Polan <SPAN
dir=ltr><<A href="mailto:pos@mckinnonsc.vic.edu.au"
target=_blank>pos@mckinnonsc.vic.edu.au</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV dir=ltr>Good Morning everyone,
<DIV><BR></DIV>
<DIV>I know this is crazy... but my 12's are making me crazy, does anyone
have any simple blunt help for Normal Form's ie 1NF 2NF. I've gone through
my explanations and Mark Kelly's slide show and my patience and my students
are still asking for clarification because of course they can learn and
remember it for Friday!!! </DIV>
<DIV><BR></DIV>
<DIV>Thanks in advance</DIV><SPAN class=HOEnZb><FONT color=#888888>
<DIV>Stephanie Polan<BR clear=all>
<DIV><BR></DIV>-- <BR>
<DIV>
<DIV dir=ltr>Miss Polan
<DIV>McKinnon
SC</DIV></DIV></DIV></DIV></FONT></SPAN></DIV><BR>_______________________________________________<BR><A
href="http://www.edulists.com.au"
target=_blank>http://www.edulists.com.au</A> - FAQ, resources, subscribe,
unsubscribe<BR>IT Applications Mailing List kindly supported by<BR><A
href="http://www.vcaa.vic.edu.au/vce/studies/infotech/itapplications3-4.html"
target=_blank>http://www.vcaa.vic.edu.au/vce/studies/infotech/itapplications3-4.html</A>
- Victorian Curriculum and Assessment Authority <br><BR><A
href="http://www.vitta.org.au"
target=_blank>http://www.vitta.org.au</A> - VITTA Victorian
Information Technology Teachers Association Inc <br><BR><A
href="http://www.swinburne.edu.au/ict/schools"
target=_blank>http://www.swinburne.edu.au/ict/schools</A> - Swinburne
University<BR></BLOCKQUOTE></DIV><BR><BR clear=all>
<DIV><BR></DIV>-- <BR>
<DIV class=gmail_signature>
<DIV dir=ltr>
<DIV><BR></DIV>
<DIV>Mark Kelly</DIV>
<DIV>mark AT vceit DOT com</DIV>
<DIV><A href="http://vceit.com" target=_blank>http://vceit.com</A></DIV>
<DIV><BR></DIV>
<DIV><I>I love the sound of people's voices after they stop talking.</I></DIV>
<DIV><BR></DIV>
<DIV><BR></DIV></DIV></DIV></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>http://www.edulists.com.au
- FAQ, resources, subscribe, unsubscribe<BR>IT Applications Mailing List
kindly supported
by<BR>http://www.vcaa.vic.edu.au/vce/studies/infotech/itapplications3-4.html -
Victorian Curriculum and Assessment Authority
<br><BR>http://www.vitta.org.au - VITTA Victorian Information
Technology Teachers Association Inc
<br><BR>http://www.swinburne.edu.au/ict/schools - Swinburne
University</BLOCKQUOTE></BODY></HTML>