create table exams( id integer primary key, timestamp integer, deck_id integer not null references decks on delete cascade );