Database Normalization?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Baricom
Posts: 3
Joined: Thu Oct 21, 2004 8:31 am

Database Normalization?

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Database Normalization?

Post 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.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Baricom
Posts: 3
Joined: Thu Oct 21, 2004 8:31 am

Post by Baricom »

Thanks, that is helpful.
jhermanns
Site Admin
Posts: 378
Joined: Tue Apr 01, 2003 11:28 pm
Location: Berlin, Germany
Contact:

Post by jhermanns »

and it performs ;)
stephan:guest

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