1. Learn
  2. /
  3. Courses
  4. /
  5. Creating PostgreSQL Databases

Exercise

Table definitions for 3rd Normal Form

Recall the definition of the school table from the previous exercise:

CREATE TABLE school (
    id serial PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    street_address VARCHAR(100) NOT NULL,
    city VARCHAR(50) NOT NULL,
    state VARCHAR(50) NOT NULL,
    zip_code INTEGER NOT NULL
)

We can define a new table called zip to help satisfy 3rd Normal Form.

Instructions

100 XP
  • Add a PRIMARY KEY named code to complete the definition of the zip table.
  • Update the definition of school to satisfy 3NF.