[drupal-devel] Request for input on Quiz module data structure [long]

Khalid B kb at 2bits.com
Thu Oct 13 00:33:33 UTC 2005

Hi Angie

The rule of thumb is to start normalized, ideally with a 3NF, then
only de-normalize
for a good reason (mainly performance).

I think this case is a very legitimate example where normalization is
warranted. By using fine tuned queries the volume of data that is
retrieved is much less than getting it all in and sifting through it
in PHP.

This leaves the DATETIME instead of a Unix timestamp issue. There must
have been a good reason for doing it this way back when Drupal
started.  Maybe it was interoperability between PostgreSQL and MySQL,
maybe it was something else.

However, I have found cases where this is really annoying, for
example, when you want to do date arithmetic, intervals, ..etc. in the
SQL engine and not retrieve the data from the database and do the
processing in PHP.

More information about the drupal-devel mailing list