Skip to content

【在线免费使用】 简单通过SQL或DBML转ER图(Chen 模型)/ Generate ER diagrams from SQL or DBML in Chen notation.

License

Notifications You must be signed in to change notification settings

ystemsrx/ER_diagram_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文

优雅的SQL建表语句转ER图的在线网页工具(SQL to ER Diagram Generator.)

快速使用

免费使用,直接访问:ER Diagram Generator

受不了了,他妈的B站上搜的DBML/SQL转Chen模型的ER图生成器都他妈的要登录和要钱,没见过这么恶心的东西,直接开源了。

如果需要绘制逻辑模型,请使用 dbdiagram.io,免费的。

SQL/DBML转ER图生成器

一个基于网页的工具,用于从SQL CREATE TABLE语句和DBML格式生成Chen模型ER图。

使用方法

  1. 在浏览器中打开 sql2er.html
  2. 在输入区域粘贴您的SQL CREATE TABLE语句或DBML代码
  3. 点击"生成ER图"按钮
  4. 查看并与生成的ER图进行交互

支持格式

SQL示例

CREATE TABLE users (
    id INT PRIMARY KEY,
    username VARCHAR(255) NOT NULL,
    email VARCHAR(255) UNIQUE
);

CREATE TABLE posts (
    id INT PRIMARY KEY,
    author_id INT,
    title VARCHAR(255),
    FOREIGN KEY (author_id) REFERENCES users(id)
);

DBML示例

Table users {
  id INT [pk]
  username VARCHAR(255) [not null]
  email VARCHAR(255) [unique]
}

Table posts {
  id INT [pk]
  author_id INT
  title VARCHAR(255)
}

Ref: posts.author_id > users.id

Chen模型元素

  • 矩形: 实体(表)
  • 菱形: 关系(外键)
  • 椭圆: 属性(列)
  • 下划线: 主键属性

示例

示例1

开源协议

MIT License

About

【在线免费使用】 简单通过SQL或DBML转ER图(Chen 模型)/ Generate ER diagrams from SQL or DBML in Chen notation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages