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.

Improve this prompt

Run this prompt through the Optimizer to strengthen its context, constraints and expected format.

Improve this prompt with the Optimizer

Comments

Be the first to comment on this prompt.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

💻DeveloppementIntermediateAll AIs

Stable Diffusion Prompt for Generating Python Code

Stable Diffusion, known for its powerful image generation, can also be used to create realistic visuals of Python code. Whether you need illustrations of code snippets for your presentations, blog posts, or educational materials, Stable Diffusion lets you generate stylized screenshots of code editors displaying Python. Unlike language models like ChatGPT or Claude that produce executable code, Stable Diffusion excels at creating photorealistic images depicting code on a screen, in an IDE, or in a terminal. This approach is especially useful for content creators, UX designers building development interface mockups, or trainers looking for impactful visuals without revealing their actual source code. By mastering the right prompts, you'll achieve convincing renderings of Python development screens with a professional aesthetic, consistent syntax colors, and careful framing. Here are the most effective prompts to make that happen.

0137
💻DeveloppementAdvancedAll AIs

Terraform Multi-Environment Architecture

Managing multiple environments with Terraform

0144
💻DeveloppementBeginnerAll AIs

Convert CSS to Tailwind

Migrate styling to Tailwind

0155
💻DeveloppementIntermediateAll AIs

Multi-Level Testing Pipeline

Structuring tests in the pipeline

0156