From the course: Advanced SQL Project: Design and Manage a Database
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Applying normalization - SQL Tutorial
From the course: Advanced SQL Project: Design and Manage a Database
Applying normalization
- [Instructor] In the last video, we created the steps needed to normalize our music database. Now let's apply these steps and implement the normalized schema in SQLight Navigate to DB browser for SQLight and open that imedia music database that we initially created in a non-normalized form. Here we're going to start implementing some of those steps that we itemized to change our non-normalized database to a normalized one. So, starting with the artist table, we're creating via this code here, a brand new artist table called artist new. And the big change we were making with this new table is to change the genre column, which was currently a text column to a genreID column. Here, in the last line, I also wanted to point out the foreign key that we are creating in our artist new table. We're saying the foreign key, which is being assigned to genreID, that new field we just created, is now referencing the genreID within the genres table. Alright, so let's now run this statement here…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.