最好用的資料庫文件生成工具
一 前言
本文介紹一些比較流行的資料庫文件生成工具,什麼是資料庫文件? 其實在工作中進行專案交付的時候經常用到;簡單來說資料庫文件就是對整個資料庫設計說明的文件,比如使用了哪個資料庫,每張表的欄位,型別說明等,然後整理成一個設計文件,這個文件多種多樣,最常見的就是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
- 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
求關注關注吖