Re: Trying to wrap my brain around a normalization issue. Assistance please?
Response from "J.O. Aho" <user@example.net>:
> -Lost wrote:
>> OK folks, please bear in mind I am a casual MySQL user, but not
>> novice (at least I don't think so, I could be wrong).
>
> Thats something I kind of think about myself too...
>
>> table: fruits
>> id: 1
>> fruit: grapes
>> fruit_id: g1
>>
>> id: 2
>> fruit: applesthe
>> fruit_id: a1
>
> It feels a bit like you have two id's for each fruit, you could
> drop one of the id's if they aren't used in another association.
>
>
>> table: associated_fruits
>> id: 1
>> -- failure of 1NF (or is it?) if I put the fruit name here
>> ?: ?
>> fid: a1, g1
>
> Just use the id's, you have the rest of the data in the fruits
> table and yes it would go against the optimal normalization (4th
> NF).
>
> Of course you should also take a look at what data you frequently
> need to fetch and you do not want to need to join too many tables,
> in some cases you can gain a little bit speed by not make the
> optimal normalization.
Ack! I totally forgot to respond to this thread. I read it though!
For some reason I did not think to respond until I just saw Mr.
Vamvas' response. Sheesh, sorry J.O. Aho.
Thanks for your feedback, it ed me to understand it a little
better.
--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
|