Re: FW: db design - which is better

From: Date: Sun, 08 Feb 2004 04:41:46 +0000
Subject: Re: FW: db design - which is better
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-32855@lists.php.net to get a copy of this message
> There just seems to be times when non-normalized table structures are easier > to work with. There are times when de-normalizing is acceptable. One of the more common uses of denormalized data is in data warehousing. Such as pre-summing sales, and storing pre-calculated aggregate information to relieve the db of doing heavy or complex calculations when summary data is going to be queried on a frequent basis. Often php-based message boards will use columns of pre-sumed data as part of a "normal" table (for example, a count of total user posts stored in the user table, that is incremented/decremented when a user adds/deletes a post, or the total number posts in a given thread stored in the topic table). This helps to allieviate the need for a count() whenever a message thread is built and you want to show the number of posts each user in the thread has, etc. So there are some acceptable situations :) Cheers, Keith.

« previous php.db (#32855) next »