Page 1 of 1

Database Normalization?

Posted: Thu Oct 21, 2004 8:43 am
by Baricom
Aloha from Hawai'i!

I'm a Movable Type refugee that wants to switch away at a convenient point. WordPress seemed too inflexible for my needs, whereas S9Y seems to be just what I'm looking for.

I was looking into the database that's generated and it seemed that certain parts of it haven't been normalized. Some examples can be found in serendipity_entries - author can be retrieved via authorid, and the comments and trackback count can be counted via serendipity_comments.entry_id.

I'm sure there's a good reason for this. Could somebody explain it to poor confused me :oops:?

Thanks,
Jesse

Re: Database Normalization?

Posted: Thu Oct 21, 2004 10:57 am
by garvinhicking
The reason was just to reduce database traffic; counting the comments is an expensive operation which we did not want to perform everytime. Also having the authorname available without needing to fetch a different table is a tribute to performance.

Regards,
Garvin.

Posted: Fri Oct 22, 2004 8:42 am
by Baricom
Thanks, that is helpful.

Posted: Fri Oct 22, 2004 9:14 am
by jhermanns
and it performs ;)

Posted: Fri Oct 22, 2004 10:32 am
by stephan:guest
I have noticed that often in the real world (tm) normalization is overrated. When it comes to perfomance many database wizards I know (mostly Oracle-based developers) tend to modify the normalized tables in order to have a faster system that performs well in real life.

stephan