GitLab Well Architected
Cookbook navigation
Prompts / Analyze Database Schema and Relationships

Analyze Database Schema and Relationships

Code UnderstandingArchitectureDatabaseDeveloperOptimizationPerformanceCreateAdvanced

Understand complex database schemas, relationships, and optimization opportunities. Identify performance bottlenecks in your data model.

For GitLab Duo

prompt

Analyze the database schema for [MODULE/FEATURE]:
1. What tables are involved?
2. What are the key relationships?
3. What indexes exist?
4. Are there circular or unnecessary relationships?
5. How are cascade operations configured?

Use the prompt

Share the schema or migrations for the module you're investigating. Including foreign keys and indexes lets Duo explain the relationships from their definitions rather than infer them from table names.