Project: Design Better Tables

Practice how to choose data types and constraints for effective table design.

We'll cover the following

Task

Redesign a books table that includes the basic structure:

  • Have an id column that is an INTEGER and a PRIMARY KEY.

  • Have a title column that is TEXT and cannot be empty (NOT NULL).

  • Have a pages column that only allows values greater than 0 using a CHECK constraint.

Get hands-on with 1400+ tech skills courses.