DEVELOPMENT WORKBOOK
Database development prompts
Work through 14 database development tasks. Open a brief to see its worked example, customise the variables and copy the completed prompt.
← All categoriesVersion a school marking rubric Advanced
Preserve the grading criteria used for each submission.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Preserve the grading criteria used for each submission.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. Paper A still resolves to rubric v1.
Worked example
Input: rubric v2 introduced after paper A was graded. Passing result: Paper A still resolves to rubric v1.
Common mistakes
- Treating the normal path as sufficient without checking this case: rubric v2 introduced after paper A was graded.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: Paper A still resolves to rubric v1.
- For “Version a school marking rubric”, show the smallest evidence a second reviewer would need before sign-off.
Represent overlapping room bookings Advanced
Prevent conflicting confirmed appointments for one room.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Prevent conflicting confirmed appointments for one room.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. A second confirmed booking starting 09:30 is rejected.
Worked example
Input: Room 3 already booked 09:00–10:00. Passing result: A second confirmed booking starting 09:30 is rejected.
Common mistakes
- Treating the normal path as sufficient without checking this case: Room 3 already booked 09:00–10:00.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: A second confirmed booking starting 09:30 is rejected.
- For “Represent overlapping room bookings”, show the smallest evidence a second reviewer would need before sign-off.
Keep double-entry journals balanced Advanced
Require each posted journal to sum to zero in one currency.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Require each posted journal to sum to zero in one currency.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. The incomplete journal cannot be posted.
Worked example
Input: debit 40 GHS and credit 35 GHS. Passing result: The incomplete journal cannot be posted.
Common mistakes
- Treating the normal path as sufficient without checking this case: debit 40 GHS and credit 35 GHS.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The incomplete journal cannot be posted.
- For “Keep double-entry journals balanced”, show the smallest evidence a second reviewer would need before sign-off.
Record produce in mixed units Advanced
Store canonical quantities and explicit conversion factors.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Store canonical quantities and explicit conversion factors.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. The canonical stock increment is 50 kg with the source unit retained.
Worked example
Input: two sacks of 25 kg. Passing result: The canonical stock increment is 50 kg with the source unit retained.
Common mistakes
- Treating the normal path as sufficient without checking this case: two sacks of 25 kg.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The canonical stock increment is 50 kg with the source unit retained.
- For “Record produce in mixed units”, show the smallest evidence a second reviewer would need before sign-off.
Retire a catalogue item Advanced
Keep historical order lines readable after product withdrawal.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Keep historical order lines readable after product withdrawal.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. An earlier order still displays its purchased description.
Worked example
Input: item K removed from sale. Passing result: An earlier order still displays its purchased description.
Common mistakes
- Treating the normal path as sufficient without checking this case: item K removed from sale.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: An earlier order still displays its purchased description.
- For “Retire a catalogue item”, show the smallest evidence a second reviewer would need before sign-off.
Store effective-dated fares Advanced
Select the fare that applied on the travel date.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Select the fare that applied on the travel date.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. A Sunday trip still prices at GHS 4.
Worked example
Input: fare changes from GHS 4 to GHS 5 on Monday. Passing result: A Sunday trip still prices at GHS 4.
Common mistakes
- Treating the normal path as sufficient without checking this case: fare changes from GHS 4 to GHS 5 on Monday.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: A Sunday trip still prices at GHS 4.
- For “Store effective-dated fares”, show the smallest evidence a second reviewer would need before sign-off.
Design a consent ledger Advanced
Append scope and withdrawal events rather than overwriting history.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Append scope and withdrawal events rather than overwriting history.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. Current consent is off while the Friday event remains discoverable.
Worked example
Input: newsletter permission withdrawn on Friday. Passing result: Current consent is off while the Friday event remains discoverable.
Common mistakes
- Treating the normal path as sufficient without checking this case: newsletter permission withdrawn on Friday.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: Current consent is off while the Friday event remains discoverable.
- For “Design a consent ledger”, show the smallest evidence a second reviewer would need before sign-off.
Track partial deliveries Advanced
Distinguish ordered, received and outstanding quantities.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Distinguish ordered, received and outstanding quantities.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. The outstanding delivery query returns four cartons.
Worked example
Input: ordered 12 cartons; received 8. Passing result: The outstanding delivery query returns four cartons.
Common mistakes
- Treating the normal path as sufficient without checking this case: ordered 12 cartons; received 8.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The outstanding delivery query returns four cartons.
- For “Track partial deliveries”, show the smallest evidence a second reviewer would need before sign-off.
Prevent cycles in reporting lines Advanced
Reject managerial assignments that loop back to the employee.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Reject managerial assignments that loop back to the employee.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. The proposed link is rejected without changing the existing reporting line.
Worked example
Input: A reports to B; assign B to A. Passing result: The proposed link is rejected without changing the existing reporting line.
Common mistakes
- Treating the normal path as sufficient without checking this case: A reports to B; assign B to A.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The proposed link is rejected without changing the existing reporting line.
- For “Prevent cycles in reporting lines”, show the smallest evidence a second reviewer would need before sign-off.
Assign unique library copies Advanced
Separate the bibliographic title from physical copy identifiers.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Separate the bibliographic title from physical copy identifiers.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. Borrowing copy C2 leaves C1 and C3 available.
Worked example
Input: three copies share one ISBN. Passing result: Borrowing copy C2 leaves C1 and C3 available.
Common mistakes
- Treating the normal path as sufficient without checking this case: three copies share one ISBN.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: Borrowing copy C2 leaves C1 and C3 available.
- For “Assign unique library copies”, show the smallest evidence a second reviewer would need before sign-off.
Preserve an address snapshot Advanced
Decouple delivery history from profile edits.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Decouple delivery history from profile edits.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. The dispatched order keeps the former delivery address.
Worked example
Input: customer moves after order dispatch. Passing result: The dispatched order keeps the former delivery address.
Common mistakes
- Treating the normal path as sufficient without checking this case: customer moves after order dispatch.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The dispatched order keeps the former delivery address.
- For “Preserve an address snapshot”, show the smallest evidence a second reviewer would need before sign-off.
Build a priority waitlist Advanced
Resolve tied application timestamps with deterministic ordering.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Resolve tied application timestamps with deterministic ordering.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. Repeated queries return the same documented tie order.
Worked example
Input: applications K and M arrive simultaneously. Passing result: Repeated queries return the same documented tie order.
Common mistakes
- Treating the normal path as sufficient without checking this case: applications K and M arrive simultaneously.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: Repeated queries return the same documented tie order.
- For “Build a priority waitlist”, show the smallest evidence a second reviewer would need before sign-off.
Merge duplicate supplier records Advanced
Redirect references while preserving invoice lineage.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Redirect references while preserving invoice lineage.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. Both historic invoices resolve to one supplier without losing original references.
Worked example
Input: supplier A and A Ltd are confirmed identical. Passing result: Both historic invoices resolve to one supplier without losing original references.
Common mistakes
- Treating the normal path as sufficient without checking this case: supplier A and A Ltd are confirmed identical.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: Both historic invoices resolve to one supplier without losing original references.
- For “Merge duplicate supplier records”, show the smallest evidence a second reviewer would need before sign-off.
Represent missing sensor readings Advanced
Keep zero separate from unavailable measurements.
Recommended tools: OpenAI Codex or Claude Code
Complete prompt
Model the records and integrity rules for {{project}}. Keep zero separate from unavailable measurements.
Use this case: {{scenario}}. Clarify any missing policy before choosing defaults. Deliver a schema sketch, constraints and synthetic sample rows. Explain transaction boundaries and demonstrate one rejected invalid change.
Acceptance criterion: {{criterion}} Explain how a reviewer can independently check it.Expected output
A schema sketch, constraints and synthetic sample rows. The average includes noon but excludes the missing observation.
Worked example
Input: meter reads zero at noon; missing at one. Passing result: The average includes noon but excludes the missing observation.
Common mistakes
- Treating the normal path as sufficient without checking this case: meter reads zero at noon; missing at one.
- Reporting a pass without evidence for the acceptance criterion.
Follow-up prompts
- Construct a contrasting case in which this result should not hold: The average includes noon but excludes the missing observation.
- For “Represent missing sensor readings”, show the smallest evidence a second reviewer would need before sign-off.