From the course: Programming Foundations: Databases

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Denormalization

Denormalization

From the course: Programming Foundations: Databases

Start my 1-month free trial

Denormalization

- While normalizing databases to third normal form is a best practice, occasionally there may be a business need or a database performance issue that requires violating the rules of normalization. Denormalization is the process of intentionally duplicating information in tables in violation of normalization rules. Denormalization is done after normalizing a database. It doesn't mean skipping normalization altogether. In our restaurant database, it's not likely we'll run into speed problems any time soon, but as an example of denormalization let's take a look at the Orders table. For each order we can determine the number of items included and a total price for those items. By using the OrderID we can get the associated items in the OrdersDishes table, count them up, and pull information from the Dishes table to get the price of each item and sum those up as well. We wouldn't usually store this information on the Orders table because if we did, we'd be storing derived information in a…

Contents