Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Database Foundations Joining Relational Data Between Tables in SQL Normalization

We're told to take the load off the Database w/ Normalization: But how is Normalizing less "Load Intensive"?

I just watched Andrew's video introducing the concept of normalization, and it looks like we're going to get into breaking up a large table into a series of smaller tables. However, Andrew's point of "taking the load off of the database with/through normalization" doesn't make sense to me. The data is still there, it's just arranged in smaller chunks. So I can't see how this is less memory intensive or "load intensive".

This feels as illogical to me as if I ordered an extra large pizza and left it as a whole pizza it's let's say 4,000 calories. If I break up the slices of pizza and scatter them around the room, it's still the same amount of calories as it was when it was arranged in a round whole pizza: 4,000 calories. So the pizza "load" of 4,000 calories doesn't change as a whole or as parts, so I assume is the same with our database table that's broken into smaller tables.

So what am I missing here in my understanding?

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Well let's take your pizza analogy a little bit further. What if you don't want to eat the whole pizza all at once? What if you want some tomorrow for lunch? Take it and put it in the refrigerator, right? This is sort of the same idea.

If you have a table with 4000 entries then when you do a search through that table it will look at all 4000 entries to get your results. If you can break that up into smaller tables with smaller amounts of information and link it back to a main point you can search your database in "bite-sized" chunks, so to speak :)

In essence, it makes searching and retrieving what you want more efficient. At least, this is my understanding of normalization.

Seth Kroger
Seth Kroger
56,414 Points

Suppose you have a database of orders for a company. You could store the customer name, shipping address, and billing info separately for each order. But that is a lot of data to wade through in a search and store in the database, especially if a customer has many orders. Instead of redundantly repeating the same info every time, it's better to have separate tables for customers, addresses, and billing info and refer to them by their ids. It makes searching the order table easier because you aren't wading through redundant info. It make updating customer info easier too because you only need to update the data in the proper table once, and not go through every record in the order table to change every redundant entry.

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Seth Kroger You said it better! But that's what I was trying to get across. No need to wade through it all at once or be redundant.