Design three tables with all keys:
shoppers — shopper_id INTEGER PRIMARY KEY, email VARCHAR NOT NULL UNIQUEpurchases — purchase_id INTEGER PRIMARY KEY, shopper_id (required, FK), placed_on DATE NOT NULLpurchase_lines — purchase_id (FK), line_no INTEGER, qty INTEGER NOT NULL (> 0); key = purchase + lineThis 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.