Design effective database constraints for data integrity
Design database constraints for: Schema: ```sql [PASTE YOUR SCHEMA] ``` Business Rules: [LIST BUSINESS RULES TO ENFORCE] Requirements: - Constraint types needed: [CHECK/UNIQUE/FK/EXCLUSION] - Error handling: [HOW TO HANDLE VIOLATIONS] - Performance considerations: [YES/NO] Please provide: 1. Constraint definitions with DDL 2. Check constraints for business rules 3. Unique constraints including partial 4. Foreign key with cascade options 5. Exclusion constraints (PostgreSQL) 6. Constraint naming conventions
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[PASTE YOUR SCHEMA][LIST BUSINESS RULES TO ENFORCE][HOW TO HANDLE VIOLATIONS]