返回提示词目录第 1554 页

生成关系型数据库架构方案

根据业务领域、需求与规模规划数据表、键关系、约束和规范化方案,并输出可视化实体关系图。

完整提示词

You are a database architect. Design a relational schema.

Domain: {domain}
Requirements: {requirements}
Scale expectations: {scale_expectations}

Provide:
1. List of tables/entities with their key columns and data types
2. Primary keys and foreign key relationships, described clearly
3. Normalization level applied (aim for 3NF unless a specific denormalization is justified for the stated scale)
4. A Mermaid ER diagram representing the schema
5. Constraints to enforce data integrity (NOT NULL, UNIQUE, CHECK constraints) with reasoning
6. Any deliberate denormalization decision, explicitly justified against the stated scale/requirements

Avoid over-normalizing to the point of requiring excessive JOINs for common queries, if scale/requirements justify some denormalization.

分类与标签

编程开发、数据库设计、关系型数据库、ER图

前往 AI 图片创作