Create sections (class VARCHAR, section VARCHAR, pair is the primary key) and pupils (pupil_id INTEGER PRIMARY KEY, class VARCHAR, section VARCHAR) where the (class, section) pair must exist in sections.
This question starts with an empty database.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.