From the course: Database Foundations: Data Structures

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Solution: Normalize a data table

Solution: Normalize a data table

(upbeat music) - [Instructor] For this challenge, we were given a single table that is in an un-normalised state, and we're asked to take the columns and break them out into two different tables so that the design meets the requirements of the third normal form. So we are told that we need to take a single table and break that out into two tables called rentals and customers. So I'm just going to get started here by typing out the create table statement for each of those. So we'll say create table customers, and I'll open up a parentheses and I'm just going to move that one down to line number six and type in a semicolon at the end of that. And then just come down to line number eight and say, create table rentals and do the same thing. Open up a parentheses, move it down, and then add the semicolon at the very end. So this is the shell for the two different tables that we're going to create. And so now I just need to go through that original data table and go through each of the…

Contents