Prompt Claude pour Generer Un Schema De Base De Donnees
The design of a database schema is a fundamental step of any software project. A well-thought-out schema ensures data consistency, facilitates queries and avoids long-term performance issues. Yet this task requires expertise in relational modeling, normalization and selection of data types adapted to the target DBMS. Claude excels in this area: by providing a functional description of your project, it generates a complete schema with tables, columns, types, constraints, indexes and relationships. It applies normalization best practices, proposes consistent naming conventions and anticipates common needs such as audit columns or soft deletes. Whether you start from a specification, a list of business entities or an existing schema to refactor, Claude produces a DDL ready to execute or a structured diagram that you can refine iteratively. It is a valuable accelerator for both solo developers and teams who want to quickly validate a data architecture before coding.
The prompt
You are an experienced database architect. From the following functional description, generate a complete relational database schema.
Project: [Describe your application, e.g., project management platform with teams, tasks and comments]
Target DBMS: [PostgreSQL / MySQL / SQLite]
Requirements:
- Apply at least 3rd normal form (3NF)
- Use snake_case naming conventions
- Add audit columns (created_at, updated_at) on every table
- Define primary keys, foreign keys, indexes and NOT NULL / UNIQUE constraints
- Handle soft delete (deleted_at) where relevant
- Add SQL comments on each table and key column
Output format:
- A text diagram of entities and relations (list of tables with their relationships)
- The complete DDL script (CREATE TABLE) ready to execute
- A separate script for recommended indexes
- Design watch points and trade-offs explained
Be exhaustive on data types (VARCHAR with length, TIMESTAMP WITH TIME ZONE, etc.) and justify your modeling choices.
Personalize this prompt with Léa
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Why it works
This prompt works because it assigns a precise expert role to Claude, which activates its in-depth knowledge of relational modeling. It imposes concrete technical constraints (3NF, conventions, audit columns) that eliminate ambiguity and produce a directly usable result. Finally, the structured output format with four deliverables forces Claude to cover all aspects of a professional schema, from design to performance recommendations.
Expected result
Variants by level
FAQ
Can Claude generate a schema for any DBMS?
How to ask Claude to modify an existing schema rather than create a new one?
Does the schema generated by Claude respect normal forms?
Related prompts
How to use this prompt
- Copy the prompt with the button above.
- Paste it into ChatGPT, Claude or your favorite AI assistant.
- Replace the bracketed variables with your details, then refine the result.
About Prompt Guide
Prompt Guide is a free library of 4800+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.
More prompts to explore
Prompt Claude to Create a Business Plan
Creating a solid business plan is a crucial step for any entrepreneur, but the process can be long and complex. Claude, Anthropic's AI assistant, excels at structuring information and strategic analysis, making it a valuable ally for drafting a professional business plan. Thanks to its ability to synthesize market data, model financial projections, and articulate a clear value proposition, Claude supports you through every section of the document: executive summary, market analysis, commercial strategy, operational plan, and financial forecasts. Whether you're preparing a file for investors, a bank loan application, or simply an internal roadmap, a well-crafted prompt allows you to obtain a structured, coherent business plan tailored to your industry. The prompt engineering approach enables you to guide Claude towards a customized result, integrating your specific data and strategic objectives to produce a truly actionable document.
Prompt Claude to Create a Marketing Plan
Creating a solid marketing plan is a strategic exercise that requires a global vision of the market, a fine understanding of your target audience, and the ability to articulate objectives, channels, and budgets consistently.
Prompt Claude to Create a Quiz
Creating an engaging and pedagogically sound quiz requires time: formulating clear questions, calibrating difficulty, writing plausible wrong answers
Prompt Claude to Create a UI Design
Claude has become an essential ally for designers and developers who want to create professional-quality user interfaces. Thanks to its deep understanding of design principles, modern CSS frameworks, and UX best practices, Claude can generate complete wireframes in HTML/CSS, propose consistent design systems, and produce production-ready frontend code. Whether you are designing a landing page, a dashboard, or a mobile application, Claude analyzes your functional and aesthetic needs to produce visually polished, accessible, and responsive interfaces. The major advantage lies in its ability to iterate quickly: you describe your vision, Claude generates a first version, then you refine together until the desired result. It masters Tailwind CSS, shadcn/ui, visual hierarchy principles, color theory, and WCAG accessibility standards. Unlike traditional design tools, Claude understands the business context of your project and adapts its suggestions accordingly, making it a particularly powerful tool for rapid prototyping and producing final interfaces.
Prompt Claude to Define a Positioning
Defining a clear positioning is the cornerstone of any successful marketing strategy. Without a solid positioning, your messages drown in the mass e
Prompt Claude to Generate Exercises
Claude excels at creating educational exercises adapted to all levels and subjects. Whether you are a teacher, trainer, or instructional designer, Anthropic's AI allows you to quickly generate structured, progressive exercises aligned with your learning objectives. By providing a well-constructed prompt, you obtain varied exercises — MCQs, fill-in-the-blanks, case studies, open problems — with their detailed answer keys and precise evaluation criteria. Claude's major advantage lies in its ability to adjust difficulty levels, vary formats, and produce clear educational explanations for each answer. No more hours spent designing batteries of exercises: in seconds, you have a coherent, ready-to-use set. This guide offers an optimized prompt as well as variants by level to get the most out of Claude in exercise generation.
Go further
Get new prompts every week
Join our newsletter.