From: Peter Brawley Date: April 14 2005 7:24pm Subject: Re: Database design question List-Archive: http://lists.mysql.com/mysql/182632 Message-Id: <425EC38B.2060508@earthlink.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=======AVGMAIL-425EC38B1B9F=======" --=======AVGMAIL-425EC38B1B9F======= Content-Type: multipart/alternative; boundary=------------000608090409030903030705 --------------000608090409030903030705 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mahmoud, >Are these values atomical? >My other question is what are the repercussions of >not putting a table in 2nd and 3rd Normal Form. Your 'choice1-subchoice1' etc are combined values, so they aren't atomic. From your three example dropdown values, it looks as if 'choice' and 'subchoice' have a many-to-many relationship, and if that's so, you'll probably need a second table for 'subchoice' and a third table to store combinations of choice and subschoice. There are examples of disadvantages of not putting a table in 2NF or 3NF at http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch01.pdf, click on 'Normalisation and the normal forms', & read the sections on 1NF, 2NF and 3NF. PB ----- Mahmoud Badreddine wrote: >Hello, >I have two questions: >I would like to know whether I am violating the principle of atomicity in >doing the following: > >I have a form which has a field with the following options: Choice1, choice2 >and choice3. >Each of the above choices have two further subchoices : subChoice1, >subchoice2. > >so in my form I have a pull-down list and these are the choices I have: >choice1-subchoice1 >choice1-subchoice2 >choice2-subchoice1 >.... >.... >and so on. > >Are these values atomical? > >My other question is what are the repercussions of not putting a table in >2nd and 3rd Normal Form. >Thank you. > > > > >------------------------------------------------------------------------ > >No virus found in this incoming message. >Checked by AVG Anti-Virus. >Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 4/14/2005 > > --------------000608090409030903030705 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mahmoud,

>Are these values atomical?

>My other question is what are the repercussions of 
>not putting a table in 2nd and 3rd Normal Form.
Your 'choice1-subchoice1' etc are combined values, so they aren't atomic. From your three example dropdown values, it looks as if 'choice' and 'subchoice' have a many-to-many relationship, and if that's so,  you'll probably need a second table for 'subchoice' and a third table to store combinations of choice and subschoice.

There are examples of disadvantages of  not putting a table in 2NF or 3NF at http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch01.pdf, click on 'Normalisation and the normal forms', & read the sections on 1NF, 2NF and 3NF.

PB

-----


Mahmoud Badreddine wrote:
Hello,
I have two questions:
I would like to know whether I am violating the principle of atomicity in 
doing the following:

I have a form which has a field with the following options: Choice1, choice2 
and choice3.
Each of the above choices have two further subchoices : subChoice1, 
subchoice2.

so in my form I have a pull-down list and these are the choices I have:
choice1-subchoice1
choice1-subchoice2
choice2-subchoice1
....
....
and so on.

Are these values atomical?

My other question is what are the repercussions of not putting a table in 
2nd and 3rd Normal Form.
Thank you.


  

No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 4/14/2005
--------------000608090409030903030705-- --=======AVGMAIL-425EC38B1B9F======= Content-Type: text/plain; x-avg=cert; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-Description: "AVG certification" No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.10 - Release Date: 4/14/2005 --=======AVGMAIL-425EC38B1B9F=======--