P
💻DeveloppementIntermediateAll AIs

Prompt to Generate Realistic Database Seeds

Generates complete seed files with realistic, consistent and relationally valid data to populate your database in development.

Paste in your AI

Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.

Tu es un développeur backend spécialisé en bases de données. Génère un fichier de seed complet et réaliste pour ma base de données.

Contexte du projet :

  • Technologie / ORM utilisé : [TECHNOLOGIE_ORM] (ex : SQL brut, Prisma, Drizzle, Sequelize, Django ORM, Laravel Eloquent, TypeORM)
  • Schéma des tables concernées : [SCHEMA_TABLES] (colle ici ta définition de tables, migrations ou modèles)

Consignes précises :

  1. Génère des données réalistes et cohérentes (noms, emails, dates, adresses plausibles — pas de "test123" ou "foo bar")
  2. Respecte toutes les contraintes du schéma : clés étrangères, types, NOT NULL, valeurs uniques, enums
  3. Crée au minimum 10 entrées par table principale et 3-5 par table de référence
  4. Assure la cohérence relationnelle : chaque clé étrangère doit pointer vers un enregistrement existant
  5. Inclus des cas limites utiles pour le développement : un utilisateur sans commandes, une commande avec plusieurs articles, un champ optionnel null
  6. Ajoute des commentaires expliquant la logique des données (pourquoi tel cas de test)
  7. Utilise la syntaxe native de l'ORM ou du format demandé (INSERT INTO, .create(), factories, JSON, CSV)
  8. Propose un ordre d'insertion qui respecte les dépendances entre tables
  9. Si pertinent, inclus un script d'exécution ou une commande pour lancer le seed

Format de sortie : fichier(s) de seed prêt(s) à l'emploi dans la syntaxe de [TECHNOLOGIE_ORM], avec commentaires.

Personalize this prompt with Léa

Answer 3 questions and Léa tailors the prompt to your situation.

Why this prompt works

<p>This prompt lets you quickly generate realistic seed data for your database, regardless of the ORM or technology used. By providing your table schema, the AI produces ready-to-use files with consistent data that respects your relational constraints.</p><p>For best results, <strong>paste your migration file or schema definition directly</strong> into the <strong>[TABLE_SCHEMA]</strong> variable. The more precise the schema, the more faithful the generated seeds will be to your structure. Feel free to specify specific business rules (e.g., "an admin user must exist", "order dates must be within the last 6 months").</p><p>The seeds intentionally include <strong>edge cases</strong> — missing data, empty relationships, boundary values — to help you test your application under realistic conditions from the development stage. The proposed insertion order ensures that dependencies between tables are respected, avoiding foreign key errors.</p>

Use Cases

Initialize a local database for developing a new featureCreate a demo dataset for a client presentationPrepare test fixtures for an integration test suitePopulate a staging environment with realistic data

Expected Output

One or more seed files in the chosen ORM syntax, containing realistic data with explanatory comments, an insertion order respecting dependencies, and useful edge cases for development and testing.

Learn more

Check the full skill on Prompt Guide to master this technique from A to Z.

View on Prompt Guide

Comments

Be the first to comment on this prompt.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Similar Prompts

💻DeveloppementAdvancedClaude

Set Up Application Observability

Implement the three pillars of observability (logs, metrics, traces) with OpenTelemetry, Prometheus, and Grafana dashboards.

44273
💻DeveloppementAdvancedAll AIs

Implement property-based testing

Add property-based tests

061
💻DeveloppementIntermediateGemini

Gemini Prompt to Generate JavaScript Code

Gemini, the artificial intelligence model developed by Google, stands out as a formidable tool for generating JavaScript code. Thanks to its deep understanding of programming languages and their ecosystems, Gemini can produce functional, optimized, and well-structured code in just a few seconds. Whether you need to create a utility function, an interactive component, a REST API, or a complex algorithm, a well-crafted prompt makes all the difference between an approximate result and production-ready code. The main challenge lies in the precision of your request: the more you specify the technical context (framework used, JavaScript version, naming conventions, expected error handling), the more Gemini generates relevant and directly usable code. This guide offers an optimized main prompt as well as variants tailored to your expertise level, to get the most out of Gemini in your daily JavaScript development projects.

051
💻DeveloppementIntermediateAll AIs

Generate Complete Technical Documentation for Your Code

A complete prompt to generate structured and professional technical documentation, adapted to the target audience and project type.

0269