Working through the normalization process
Table normalization is an important action to undertake prior to creation of a new database to ensure that data redundancy is reduced and the integrity of your data is properly managed.
In this exercise, you will have an opportunity to practice normalizing database tables related to the Small Business Association loan program:
- a
borrower
table will be altered to satisfy the requirements for 1st Normal Form (1NF) - a
bank
and aloan
table will be altered to satisfy the requirements for 2nd Normal Form (2NF) - the
loan
table will be altered again to satisfy the requirements for 3rd Normal Form (3NF)
After completing this exercise, you should feel more confident in your ability to normalize database tables.
Cet exercice fait partie du cours
Creating PostgreSQL Databases
Exercice interactif pratique
Essayez-vous à cet exercice en complétant cet exemple de code.
-- Add new columns to the borrower table
ALTER TABLE borrower
ADD COLUMN ___ VARCHAR (50) NOT NULL,
ADD COLUMN ___ VARCHAR (50) NOT NULL;
-- Remove column from borrower table to satisfy 1NF
ALTER TABLE borrower
DROP COLUMN ___;