Prompt Details
Model
(claude-5-sonnet)
Token size
448
Example input
[Insert]: TaskFlow Pro
[SaaS / E-commerce / CRM / Marketplace / Mobile App / ERP / CMS / Other]: SaaS
[Describe]: Users can register and log in. Organizations can manage multiple projects. Team members can create and assign tasks. Admins can monitor project activity.
[List]: User Authentication Organization Management Project Management Task Management Comments Notifications
[PostgreSQL / MySQL / SQL Server / SQLite / MongoDB / Firebase / DynamoDB / Other]: PostgreSQL
Example output
Expected Output
1οΈβ£ Requirements & Data Analysis
Business Objectives
Build a multi-tenant project management SaaS.
Enable secure collaboration between teams.
Support scalable project and task management.
Maintain user privacy and regulatory compliance.
Core Entities
Users
Organizations
Projects
Tasks
Comments
Notifications
Roles
Activity Logs
Data Requirements
Secure user accounts
Role-based permissions
Task ownership
Project history
Notification records
Functional & Non-Functional Constraints
Multi-tenant architecture
High availability
Fast query performance
GDPR compliance
Horizontal scalability
---
2οΈβ£ Database Schema Design
Tables
users
organizations
organization_members
projects
tasks
comments
notifications
roles
activity_logs
Primary Relationships
Organization β Projects (One-to-Many)
Project β Tasks (One-to-Many)
User β Tasks (One-to-Many)
Task β Comments (One-to-Many)
User β Organization (Many-to-Many)
Example Fields
users
id (UUID, PK)
name (VARCHAR)
email (VARCHAR, UNIQUE)
password_hash (TEXT)
created_at (TIMESTAMP)
projects
id (UUID, PK)
organization_id (UUID, FK)
name (VARCHAR)
status (VARCHAR)
created_at (TIMESTAMP)
tasks
id (UUID, PK)
project_id (UUID, FK)
assigned_to (UUID, FK)
title (VARCHAR)
description (TEXT)
due_date (DATE)
status (VARCHAR)
---
3οΈβ£ Data Integrity & Normalization
Normalization Level
Third Normal Form (3NF)
Constraints
Primary Keys
Foreign Keys
UNIQUE(email)
NOT NULL on required fields
CHECK(status IN ('Todo','In Progress','Done'))
Validation Rules
Email format validation
Required task title
Future due date validation
Unique organization membership
Referential Integrity Strategy
ON DELETE CASCADE for comments
ON DELETE RESTRICT for organizations
ON UPDATE CASCADE for foreign keys
---
4οΈβ£ Performance & Scalability
Indexing Strategy
Index email
Index organization_id
Index project_id
Index assigned_to
Composite index (project_id, status)
Query Optimization
Use pagination
Avoid SELECT *
Batch database queries
Optimize joins
Partitioning
Partition activity_logs by month
Archive completed projects
Caching Opportunities
User sessions
Organization settings
Frequently accessed projects
Dashboard summaries
---
5οΈβ£ Security & Maintenance
Access Control
Role-Based Access Control (RBAC)
JWT authentication
Least privilege permissions
Encryption
AES-256 for sensitive data
TLS for data in transit
Password hashing using Argon2
Backup & Recovery
Daily full backups
Hourly incremental backups
Point-in-time recovery
Disaster recovery testing
Audit Logging
Login history
Project updates
Task changes
Permission modifications
---
6οΈβ£ Implementation & Growth Roadmap
SQL DDL Guidance
Create tables with UUID primary keys
Add indexes after table creation
Define foreign key constraints
Create database views for reporting
Migration Strategy
1. Create base tables
2. Seed default roles
3. Apply indexes
4. Import sample data
5. Run migration validation
Testing Checklist
CRUD operations
Foreign key validation
Index performance
Authentication tests
Load testing
Backup restoration testing
Future Scalability Recommendations
Introduce read replicas
Use Redis caching
Implement database connection pooling
Add message queues for notifications
Consider sharding for enterprise-scale deployments
Monitor performance with query analytics and automated alerts π
By purchasing this prompt, you agree to our terms of service
CLAUDE-5-SONNET
Poor database design leads to slow performance, inconsistent data, difficult maintenance, and expensive scalability issues.
This prompt transforms AI into a senior database architect that creates production-ready database schemas, normalized table structures, relationships, indexing strategies, and optimization recommendations tailored to your application's requirements.
β¨ What You Receive:
ποΈ Production-ready database schema
π Entity relationship design (ERD)
π Table relationships & foreign
...more
Added 1 week ago
