This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes Normalised/denormalised database tables Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Normalised/denormalised database tables" Watch "Normalised/denormalised database tables" New topic
Author

Normalised/denormalised database tables

Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
I was reading Steve Souza's FAQ on this site, about performance, and I read that there could be a performance difference between normalised and denormalised database tables. That could be very interesting to me, if I knew what it meant!

Can anyone help me with a succinct explanation?


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2343

Database normalization is the process of structuring your data according to the relational theory. Wikipedia has a nice explanation of normalzations, and the steps to normalize a database.

Normalization focuses on the structure of your database. It may be that this optimal structured database does not meet your performance requirements. You can take a step back, and make a choice between optimal structure and better performance.

Regards, Jan
[ April 16, 2007: Message edited by: Jan Cumps ]

OCUP UML fundamental
ITIL foundation
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3652

The simple answer from a programming perspecive, is that data exists in only one place in fully normalized systems and is duplicated in un-normalized. So you can think of it it terms of unique or duplicate date. Unique data has the organizational convenience that updates only need to be made to one table, where duplicate data, you may have to update multiple fields.

Think of a column that keeps a count of the number of similar records. You could update this entry every time you add/update a record in the table, or you could delete this field and recompute similarity every time someone asks for it. There's no clear advantage. Performance-wise fully normalized can be awful, often joining dozens of tables per query. The goal is usually to get as close to fully normalized as possible while still allowing for quick access to methods like count. Often times such data can be maintained by triggers and/or whats called "materialized views".


My Blog: Down Home Country Coding with Scott Selikoff
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
OK, thanks. I was aware of those types of issues and practices, but didn't know it was called "normalisation". Now I do.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Normalised/denormalised database tables
 
Similar Threads
What impedence mismatch?
Between Two Database
CMP to Map multiple tables
BMP without Primary key
inserting xml string into oracle database