1

一 前言

本文介绍一些比较流行的数据库文档生成工具,什么是数据库文档? 其实在工作中进行项目交付的时候经常用到;简单来说数据库文档就是对整个数据库设计说明的文档,比如使用了哪个数据库,每张表的字段,类型说明等,然后整理成一个设计文档,这个文档多种多样,最常见的就是word,有了数据库文档对以后的数据库维护,或者进行二次开发都很方便;

二 流行的数据库文档生成工具

2.1 screw

最近比较火的一款数据库文档生成工具目前支持如下几种数据库,其它还在开发中

  • MySQL
  • MariaDB
  • TIDB
  • Oracle
  • SqlServer
  • PostgreSQL
  • Cache DB

文档生成支持

文档生成支持

  • html
  • word
  • markdwon

生成示例

使用方式 支持 java ,和 maven 插件, java方式看官方文档;

<build\>  
 <plugins\>  
 <plugin\>  
 <groupId\>cn.smallbun.screw</groupId\>  
 <artifactId\>screw-maven-plugin</artifactId\>  
 <version\>${lastVersion}</version\>  
 <dependencies\>  
 <!-- HikariCP -->  
 <dependency\>  
 <groupId\>com.zaxxer</groupId\>  
 <artifactId\>HikariCP</artifactId\>  
 <version\>3.4.5</version\>  
 </dependency\>  
 <!--mysql driver-->  
 <dependency\>  
 <groupId\>mysql</groupId\>  
 <artifactId\>mysql-connector-java</artifactId\>  
 <version\>8.0.20</version\>  
 </dependency\>  
 </dependencies\>  
 <configuration\>  
 <!--username-->  
 <username\>root</username\>  
 <!--password-->  
 <password\>password</password\>  
 <!--driver-->  
 <driverClassName\>com.mysql.cj.jdbc.Driver</driverClassName\>  
 <!--jdbc url-->  
 <jdbcUrl\>jdbc:mysql://127.0.0.1:3306/xxxx</jdbcUrl\>  
 <!--生成文件类型-->  
 <fileType\>HTML</fileType\>  
 <!--打开文件输出目录-->  
 <openOutputDir\>false</openOutputDir\>  
 <!--生成模板-->  
 <produceType\>freemarker</produceType\>  
 <!--文档名称 为空时:将采用\[数据库名称-描述-版本号\]作为文档名称-->  
 <fileName\>测试文档名称</fileName\>  
 <!--描述-->  
 <description\>数据库文档生成</description\>  
 <!--版本-->  
 <version\>${project.version}</version\>  
 <!--标题-->  
 <title\>数据库文档</title\>  
 </configuration\>  
 <executions\>  
 <execution\>  
 <phase\>compile</phase\>  
 <goals\>  
 <goal\>run</goal\>  
 </goals\>  
 </execution\>  
 </executions\>  
 </plugin\>  
 </plugins\>  
</build\>

项目地址: https://gitee.com/leshalv/screw

2.2 DBCHM

DBCHM 支持SqlServer/MySQL/Oracle/PostgreSQL/DB2/SQLite数据库。

支持的导出的文件格式;

  • chm
  • word
  • excel
  • pdf
  • html
  • xml
  • markdown

效果展示

最新版本示 DBCHM.exe 软件,上手也容易;

项目地址:https://gitee.com/lztkdr/DBCHM

2.3 TableGo

TableGo是基于数据库的代码自动生成工具,低代码编程技术的实现,可以零代码自动生成SpringBoot项目工程、生成JavaBean、生成MyBaits的Mapper映射配置文件、生成数据库设计文档(Word、Excel)、生成Swagger2离线API文档、生成前后端代码、能查出数据库数据生成各种代码和文档等;

支持MySQL、Oracle、SQL Server、PostgreSQL、MariaDB五种数据库;

使用自定义模板功能可以根据数据库表结构信息生成你想要的任何代码,例如:Java、C#、C++、Golang、Rust、Python、Objective-C、Swift、VB、VC、SQL、HTML、JSP、JS、PHP、Vue、React、Word、Excel等;

界面展示:

详细介绍地址:https://blog.csdn.net/vipbooks/article/details/78767469

官网地址:http://www.tablego.cn/

求关注关注吖


知识追寻者
19 声望0 粉丝