Re: FW: db design - which is better

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux