On Thu, Dec 05, 2002 at 11:42:28PM -0500, Michael She wrote:
> Although normalization is good practice, it can complicate queries.

It is almost always good practice.  If done right, it need not even
complicate the queries much (see my response to this thread earlier).

For what its worth, I've always found that any query-writing complication
is much better to spend my time on than fixing the problems caused by
not normalizing a table structure from the start.  Every time I've used
ENUM's for example (except enum('no','yes') type things), I've regretted
not just making another table with a list of values and a foreign key.

As soon as you want to expand what the database does (it always happens),
a normalized structure lets you add what you want/need without changing
anything (in my experience; not sure if this is provable or not).

> Monday: 11AM,1PM,5PM,1AM
> Tuesday 10AM,1PM,6PM,12AM
> 
> You'll only need 7 fields.

If you're going to do that, you might as well just store it as a varchar
and parse it when necessary too.

> OR, you can reduce it further and only have 3 Fields.  Morning, Afternoon, 
> Night.  Then you can store all times for the week into one string.

This is limiting; and not all locations have afternoon times, and some might
have five times of day.

Just my $0.03 ... :)
-- 
Michael T. Babcock                                                       sql
CTO, FibreSpeed Ltd.     (Hosting, Security, Consultation, Database, etc)
http://www.fibrespeed.net/~mbabcock/

---------------------------------------------------------------------
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