{"data":{"slug":"github-eosphoros-ai-db-gpt-assets-suites-metadata-architecture-expert-skills-physical-er-110ee74b5a4c","title":"Generate Physical Entity Relationship Diagram","summary":"Generate a physical entity relationship diagram based on declared primary keys, unique keys, and foreign keys, used for architecture documentation or relationship visualization. Deliverables include renderable diagrams and downloadable files in formats such as draw.io, DBML, Mermaid, and SVG.","url":"https:\/\/skillshunter.net\/skills\/github-eosphoros-ai-db-gpt-assets-suites-metadata-architecture-expert-skills-physical-er-110ee74b5a4c","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-eosphoros-ai-db-gpt-assets-suites-metadata-architecture-expert-skills-physical-er-110ee74b5a4c","markdown_url":"https:\/\/skillshunter.net\/skills\/github-eosphoros-ai-db-gpt-assets-suites-metadata-architecture-expert-skills-physical-er-110ee74b5a4c.md","download_url":"https:\/\/skillshunter.net\/skills\/github-eosphoros-ai-db-gpt-assets-suites-metadata-architecture-expert-skills-physical-er-110ee74b5a4c\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure that the schema or tables to be included in the diagram are specified before generating the output. The tool does not infer joins or relationships that are not explicitly declared as foreign keys.","instructions":"---\nname: physical-er\nname_zh: \u7269\u7406 ER \u56fe\nname_en: Physical ER\ndescription: Build physical ER diagrams from declared keys and foreign keys. Use for schema relationships or ER documentation. Do not present inferred joins as lineage.\ndescription_zh: \u7528\u6237\u8981\u6c42 ER \u56fe\u3001\u8868\u5173\u7cfb\u6216\u7269\u7406\u67b6\u6784\u56fe\u65f6\u4f7f\u7528\uff1b\u771f\u5b9e\u7ea6\u675f\u4e0e\u5019\u9009\u63a8\u65ad\u5206\u5f00\uff0c\u4ea4\u4ed8\u53ef\u6e32\u67d3\u56fe\u4e0e draw.io\u3001DBML\u3001Mermaid\u3001SVG \u4e0b\u8f7d\u6587\u4ef6\u3002\ncommand: \/physical-er\nargument-hint-zh: \u6307\u5b9a\u8981\u5c55\u793a\u5173\u7cfb\u7684\u8868\u6216 schema\nargument-hint-en: Specify tables or schema for the relationship diagram\nuser-invocable: true\n---\n\n# \u7269\u7406 ER \u56fe\n\n\u9075\u5b88[\u8bfb\u53d6\u8fb9\u754c](..\/..\/references\/metadata-boundaries.md)\uff0c\u4f7f\u7528[\u76ee\u5f55\u8bc1\u636e](..\/..\/references\/catalog-sources.md)\u4e0e[\u62a5\u544a\u6a21\u677f](..\/..\/templates\/schema-report.md)\u3002\n\n1. \u6536\u96c6\u4e3b\u952e\u3001\u552f\u4e00\u952e\u3001\u5916\u952e\u5217\u5bf9\u5e94\u53ca nullable\uff0c\u786e\u4fdd\u8de8 schema \u548c\u590d\u5408\u952e\u6620\u5c04\u51c6\u786e\u3002\n2. \u5c06\u58f0\u660e\u5916\u952e\u653e\u5165\u771f\u5b9e\u5173\u7cfb\u8868\uff0c\u6309\u7ea6\u675f\u8868\u8fbe\u5b9e\u4f53\u8fde\u63a5\u3002\u57fa\u6570\u9700\u7ed3\u5408\u552f\u4e00\u6027\u548c NULL\uff1b\u65e0\u6cd5\u8bc1\u660e\u7684\u90e8\u5206\u660e\u786e\u4e3a\u63a8\u65ad\u6761\u4ef6\u3002\n3. \u540d\u79f0\u76f8\u4f3c\u3001\u7528\u6237\u5efa\u8bae JOIN \u6216\u7f3a\u5c11\u7ea6\u675f\u7684\u5173\u8054\uff0c\u653e\u5165\u72ec\u7acb\u5019\u9009\u8868\u3002\u6ca1\u6709 FK \u65f6\u8f93\u51fa\u201c\u672a\u53d1\u73b0\u53ef\u89c1\u58f0\u660e\u5916\u952e\u201d\uff0c\u4e0d\u8865\u9020\u771f\u5b9e\u56fe\u8fb9\u3002\n4. \u5fc5\u987b\u8c03\u7528 generate_er_diagram\uff0c\u4e0d\u4ee5 Markdown \u4ee3\u7801\u5757\u4ee3\u66ff\u6e32\u67d3\u4ea7\u7269\u3002model \u53c2\u6570\u5305\u542b title\u3001evidence_artifact_ids\uff08\u672c\u4f1a\u8bdd sql_query \u8fd4\u56de\u7684\u771f\u5b9e\u4e14\u672a\u622a\u65ad\u7684\u5143\u6570\u636e\u67e5\u8be2 ID\uff09\u3001tables\uff08id\/name\/schema\/columns\uff0c\u5217\u542b name\/type\/primary_key\/nullable\uff09\u548c relationships\uff08name\/from_table\/to_table\/from_columns\/to_columns\/kind\/basis\uff09\u3002kind \u53ea\u80fd\u662f declared \u6216 inferred\uff0c\u6bcf\u6761\u5173\u7cfb\u7ed9\u51fa\u6765\u6e90\u4f9d\u636e\uff0c\u590d\u5408\u952e\u6309\u5217\u5bf9\u5e94\u3002\u6ca1\u6709 FK \u65f6\u4ecd\u751f\u6210\u8868\u5b57\u6bb5\u56fe\uff0crelationships \u53ef\u4ee5\u4e3a\u7a7a\u3002\n5. \u68c0\u67e5\u5de5\u5177\u8fd4\u56de success\uff1b\u4ea4\u4ed8\u5185\u8054\u53ef\u7f29\u653e HTML \u56fe\u3001drawio\uff08diagrams.net \u6253\u5f00\u7f16\u8f91\uff09\u3001DBML\uff08dbdiagram \u5bfc\u5165\uff09\u3001Mermaid \u6e90\u7801\u3001SVG \u548c JSON\u3002\u63a8\u65ad\u5173\u7cfb\u5728\u6e32\u67d3\u56fe\u548c draw.io \u4e2d\u4e3a\u865a\u7ebf\uff0c\u5728 DBML \u4e2d\u4ec5\u4f5c\u6ce8\u91ca\uff0c\u4e0d\u8f6c\u6362\u4e3a\u771f\u5b9e\u7ea6\u675f\u3002Mermaid \u4f7f\u7528\u5b89\u5168\u522b\u540d\uff1b\u57fa\u6570\u672a\u786e\u8ba4\u65f6\u4e0d\u5f97\u5ba3\u79f0\u5df2\u7ecf\u8bc1\u660e\u4e00\u5bf9\u591a\u3002\u4e0b\u8f7d\u91c7\u7528\u5de5\u5177\u5b9e\u9645\u4ea7\u7269\uff0c\u4e0d\u7f16\u9020\u94fe\u63a5\u3002\n6. \u5927\u8303\u56f4\u6309\u4e1a\u52a1\u57df\u62c6\u5206\uff0c\u6bcf\u56fe\u4e0d\u8d85\u8fc7 60 \u8868\u3001\u6bcf\u8868 150 \u5217\u3001200 \u6761\u5173\u7cfb\uff1b\u8bf4\u660e\u56fe\u4e2d\u5b57\u6bb5\u8303\u56f4\uff0c\u4fdd\u7559\u5b8c\u6574\u5173\u7cfb\u6620\u5c04\u4e0e\u8bc1\u636e\u3002\u5b8c\u6574\u62a5\u544a\u53ef\u518d\u8c03\u7528 generate_report\uff0c\u5f15\u7528\u5df2\u751f\u6210\u56fe\u53ca\u5173\u7cfb\u8868\u3002\u5de5\u5177\u5931\u8d25\u65f6\u8bf4\u660e\u539f\u56e0\uff0c\u4ea4\u4ed8\u5173\u7cfb\u8868\u548c\u6e90\u7801\uff0c\u4e0d\u5ba3\u79f0\u5df2\u751f\u6210\u53ef\u4e0b\u8f7d\u56fe\u3002\n","use_cases":["Visualize physical relationships between database tables","Generate ER diagrams for architecture documentation","Validate foreign key constraints and entity connections"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/eosphoros-ai\/DB-GPT\/blob\/bb9c5e8a62a2c3ee3ea62e4c42d88f4deea2f372\/assets\/suites\/metadata-architecture-expert\/skills\/physical-er\/SKILL.md","source_commit":"bb9c5e8a62a2c3ee3ea62e4c42d88f4deea2f372","license":null,"version":null,"listing_approved_at":"2026-11-27","created_at":"2026-11-26T10:16:27.000000Z","updated_at":"2026-11-27T07:43:08.000000Z","seo_title":"Physical Entity Relationship Diagram Generator Tool","seo_description":"Generate a physical entity relationship diagram based on declared primary keys, unique keys, and foreign keys, used for architecture documentation or relationship display","seo_keywords":["Generate Physical Entity Relationship Diagram","Database Architecture Documentation","Foreign Key Constraint Relationships","ER Diagram Generator Tool"]}}