drop table student cascade; create table student ( gnum integer check(gnum between 1 and 3), cnum integer check(cnum between 1 and 8), num integer check(num between 1 and 40), name text not null, primary key (gnum, cnum, num) );