I built a tool to generate relational SQL seed data with preserved foreign keys
说明与用途
SeedSQL 生成符合外键约束的真实测试数据,快速简化本地数据库和 CI 流程的设置。
问题
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