* Daniel Jarrett
> I'm just wondering..
>
> say i have a members table as my main table in MYSQL..
> and in that table i have a field named month, that will be one of twelve
> options.
>
> would it be better practice to have the  month field linked to
> another table
> called months and have the month table populated with the values 1 to 12?
> or is it fine just to have it as a field which is not linked.

In this particular case, I would not create a separate table.

In general, I would make a separate table if the data (the number which may
have a value from 1 through 12) _represents_ something else...

In this case it actually does represent something else, namely months,  and
the reason not to create a separate table is that we already have builtin
functions in mysql (and in whatever programming language we are using to
access mysql) that can tell us the name of the month based on the number.

If the number had represented anything else, like a member category, a
separate table would have been natural.

If the number had meant 'payment periods per year', a separate table would
have been meaningless. The number does not _represent_ 'payment periods per
year', it _is_ 'payment periods per year'...

Hope this was clearifying. :o)

--
Roger


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to