I built a tool to generate relational SQL seed data with preserved foreign keys
Описание и применение
SeedSQL генерирует реалистичные данные для тестовых баз, соблюдая внешние ключи, быстро и без ручного ввода.
Задача
Hand‑writing mock SQL data for local testing is slow, and using LLMs breaks down when thousands of rows with strict relational constraints are needed.
Результат
SeedSQL produces deterministic, foreign‑key‑aware seed data in seconds, eliminating manual effort and LLM limitations.
Рабочий процесс
- 1. Define database schema or upload it to SeedSQL.
- 2. Configure data types, ranges, and patterns for each column.
- 3. Run the generator to produce synthetic rows with correct foreign key mappings.
- 4. Export the output as INSERT statements for PostgreSQL, MySQL, SQLite, or as structured JSON.
- 5. Execute the statements against the local database or CI environment.
Доказательства
Standard generators treat tables independently, creating orphaned relationships (Users → Orders).
AI Limits: Prompting LLMs for large datasets gets slow, hits token caps, and yields non-deterministic outputs.
Preserves Foreign Keys: Automatically maps parent-child primary keys across connected tables.
- Дата записи: 2026-09-10T06:00:50.828Z