Problem: Design Better Tables
Redesign a books table that includes the basic structure:
Have an
idcolumn that is anINTEGERand aPRIMARY KEY.Have a
titlecolumn that isTEXTand cannot be empty (NOT NULL).Have a
pagescolumn that only allows values greater than 0 using aCHECKconstraint.
Problem: Design Better Tables
Redesign a books table that includes the basic structure:
Have an
idcolumn that is anINTEGERand aPRIMARY KEY.Have a
titlecolumn that isTEXTand cannot be empty (NOT NULL).Have a
pagescolumn that only allows values greater than 0 using aCHECKconstraint.