Database Constraint Designer
Design comprehensive database constraints for data integrity
6/11/2026
Prompt
Design constraints for this database schema:
**Tables:**
```sql
{{TABLE_SCHEMA}}
```
**Business Rules:** {{BUSINESS_RULES}}
**Data Validation Requirements:** {{VALIDATION_REQUIREMENTS}}
**Database System:** {{DATABASE_SYSTEM}}
Please provide:
1. Primary key constraints with rationale
2. Foreign key constraints with:
- Referential actions (CASCADE, SET NULL, etc.)
- Justification for each choice
3. UNIQUE constraints
4. CHECK constraints for business rules
5. NOT NULL specifications
6. DEFAULT values
7. Constraint naming conventions
8. Performance impact of constraints
9. Testing constraint violations
10. Error handling recommendationsOr press ⌘C to copy
Variables (4)
Replace these placeholders with your own content before using the prompt.
[{TABLE_SCHEMA][{BUSINESS_RULES][{VALIDATION_REQUIREMENTS][{DATABASE_SYSTEM]Command Palette
Search for a command to run...