From the course: SQL Server 2012: Designing Database Solutions

Unlock the full course today

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

Using third normal form

Using third normal form - SQL Server Tutorial

From the course: SQL Server 2012: Designing Database Solutions

Start my 1-month free trial

Using third normal form

- In this section, I'd like to talk about Third Normal Form. In order for our database to be in Third Normal Form, we first need to be in Second Normal Form. And additionally, we need to have no caluclated columns in the database. So let's look at an example of a calculated column. Here in a hypothetical table called, "OrdersLineItem," for each line item we store the price and the quantity ordered and what that totals out to. So, for the first line, $25.00 per shirt, someone ordered 3 shirts... So for the total for that line item is $75.00. Storing the total here, to me, isn't a huge mistake. But there are some issues. If we ever wanted to go back and change the price or the quantity, then you would also have to change the total and we'd like to avoid that. We don't like to have to change two things at once. And also storing the total could be looked at as wasted space. Because if we ever need that piece of information, we could always compute it on the fly. We'll assume this database…

Contents