Denormalization is the process of allowing redundancies to optimize the performance.
To overcome the update anamolies, maintain the denormalized data in transactions.
1. Denormalize to Maintain History
A fully normalized schema shows current state only.History can be easily maintained in a denormalised schema by having more tables.
2. Denormalize for Performance
Performance is increased by the need of fewer joins in a denormalised schema.
Example:
In an invoicing application that is in a fully normalized design, customer's address will be only in the Customers table. Suppose that a customer moves and you update that customer's address with the new one. A few days later, the same customer reports that he accidentally lost some printed invoices during the move and asks you to print copies of lost invoices. It would be impossible to print exact copies of the invoices if you do not maintain some history about the customer's address. You can solve this problem by maintaining a
copy of customer address information on the invoice date in the Invoices table which is a denormalised form. Similarly, customers can change their name, so you also need to maintain a copy of customer names as part of the invoice data in the Invoices table.
Thanks,
Gayathri P
Sumit.Bundiwal, if this helps please login to Mark As Answer. | Alert Moderator