SQL Schema Design From Requirements With Keys and Constraints
Design a SQL schema from written requirements, with tables, primary and foreign keys, constraints and reasons for each choice.
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
[VERIFY] is an editorial flag, not a blank to fill. Wherever the prompt shows [VERIFY], check that item against a reliable source before you use it.
Design a relational schema from these requirements: [REQUIREMENTS]. Database system: [DATABASE]. Expected volumes: [VOLUMES]. Reports needed: [REPORTS]. Rules that must always hold: [BUSINESS_RULES]. Ask questions about unclear requirements instead of guessing, and keep the design as simple as the requirements allow. Propose tables with columns, data types, primary keys, foreign keys, unique and check constraints and nullability, explaining each choice in plain words, with the relationships (one-to-many, and many-to-many through a link table). Identify normalisation decisions and where you would deliberately denormalise for reporting, with the reason. Write the CREATE TABLE statements and sample INSERT statements with invented data, marked [VERIFY], and list the indexes you would add for the reports and why. Cover what not to store (passwords in plain text, unnecessary personal data) and personal data handling [VERIFY legal requirements]. Test plan: queries that should succeed and statements that should fail because of constraints. Add a note on migrating the schema later.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.