课程: Advanced SQL Project: Design and Manage a Database
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
Applying normalization - SQL教程
课程: 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…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。