用schemaSpy制作数据库文档

本文涉及的产品
云数据库 RDS SQL Server,独享型 2核4GB
简介:
Schemaspy是一款Java开发的数据库文档生成工具,是开源的。生成的数据库文档非常的漂亮,实用。最近探索了两天终于会使用这个工具了。我接触到这个工具是在开源的DotNet工作流 netBpm 网站上看到netBpm的数据库文档。
1、下载软件
JDK下载  [url]http://java.sun.com/javase/index.jsp[/url]可以下载到最新版本
SchemaSpy下载  SchemaSpy
Graphviz - Graph Visualization Software 下载  [url]http://www.graphviz.org[/url]
SqlServer2005 JDBC驱动下载 [url]http://msdn.microsoft.com/data/[/url] jdbc/
2、配置JDK和环境变量
1)确认登陆Windows帐号为管理员级别帐号
2)鼠标右击[我的电脑]-弹出菜单中选择[属性]-弹出对话框中选择[高级]-点击[环境变量]
3)下面操作在[系统变量]中进行,如果系统变量已存在相同变量名且包含相同变量值,则跳过该步操作;如果系统变量已存在相同变量名但未包含相同变量值,则添加该变量值(用英文“;”隔开);如果系统变量不存在相同变量名,则按如下操作[新建]变量名并赋变量值。
[新建]变量名:Java_Home    变量值:c:\ j2sdk1.4.1_02
[新建]变量名:Path    变量值:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Documents and Settings\Administrator\桌面\IronPython\IronPython-1.0;C:\j2sdk1.4.1_02\bin;C:\PROGRA~1\ATT\Graphviz\bin;
[新建]变量名:ClassPath        变量值:
C:\j2sdk1.4.1_02\lib;C:\j2sdk1.4.1_02\lib\tools.jar;C:\j2sdk1.4.1_02\lib\dt.jar;D:\Program Files\SplendidCRM Software\schemaSpy_3.0.0.jar;c:\Program Files\SplendidCRM Software\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.0\enu\sqljdbc.jar
3、 为运行Schemaspy制作一个批处理命令:
java -jar schemaSpy_3.0.0.jar -t mssql05 -db SPLENDIDCRM -host SHANYOU\SPLENDIDCRM -port 1433 -o SPLENDIDCRM -u crm -p crm -s dbo
java -jar schemaSpy.jar -t dbType -db dbName [-s schema] -u user [-p password] -o outputDir [-nohtml][-noimplied]
Parameter
Description
-t databaseType
Type of database (e.g. ora, db2, etc.). Use -dbhelp for a list of built-in types. Defaults to ora.
*
-db dbName
Name of database to connect to
*
-u user
Valid database user id with read access
-s schema
Database schema (optional if the same as user or isn't supported by your database)
-p password
Password associated with that user. Defaults to no password.
*
-o outputDirectory
Directory to write the generated HTML/graphs to
-cp pathToDrivers
Looks for drivers here before looking in driverPath in [databaseType].properties
-nohtml
Only generate files needed for insertion/deletion of data (e.g. for scripts)
-x columnNamesRegex
Exclude matching columns from relationship analysis to simplify the generated graphs. This is a regular expression that's used to determine which columns to exclude. It must match table name, followed by a dot, followed by column name.
For example: -x "(book.isbn)|(borrower.address)"
Note that each column name regular expression must be surround by ()'s and separated from other column names by a |.
-noimplied
Don't include implied foreign key relationships in the generated table details
* denotes required parameter.
Here are the currently supported database types. Use java -jar schemaSpy.jar -dbhelp for a complete list of the supported database types and the parameters that each one requires.
Type
Description
db2
IBM DB2 with the 'App' Driver
db2net
IBM DB2 with the 'Net' Driver
firebird
Firebird
hsqldb
HSQLDB Server
mssql
Microsoft SQL Server
mysql
MySQL
ora
Oracle with OCI8 Driver
orathin
Oracle with Thin Driver
pgsql
PostgreSQL
sybase
Sybase Server with JDBC3 Driver
sybase2
Sybase Server with JDBC2 Driver
udbt4
DB2 UDB Type 4 Driver





本文转自 张善友 51CTO博客,原文链接:http://blog.51cto.com/shanyou/75006,如需转载请自行联系原作者
相关实践学习
使用SQL语句管理索引
本次实验主要介绍如何在RDS-SQLServer数据库中,使用SQL语句管理索引。
SQL Server on Linux入门教程
SQL Server数据库一直只提供Windows下的版本。2016年微软宣布推出可运行在Linux系统下的SQL Server数据库,该版本目前还是早期预览版本。本课程主要介绍SQLServer On Linux的基本知识。 相关的阿里云产品:云数据库RDS SQL Server版 RDS SQL Server不仅拥有高可用架构和任意时间点的数据恢复功能,强力支撑各种企业应用,同时也包含了微软的License费用,减少额外支出。 了解产品详情: https://www.aliyun.com/product/rds/sqlserver
目录
相关文章
|
1月前
|
编解码 缓存 数据库
【软件设计师备考 专题 】编写内部设计文档:屏幕设计和数据库设计
【软件设计师备考 专题 】编写内部设计文档:屏幕设计和数据库设计
63 0
|
1月前
|
Java 关系型数据库 MySQL
基于springboot+vue网吧管理系统(程序+数据库+文档)
基于springboot+vue网吧管理系统(程序+数据库+文档)
|
1月前
|
搜索推荐 Java 数据库
基于springboot+vue网上图书商城(程序+数据库+文档)
基于springboot+vue网上图书商城(程序+数据库+文档)
|
1月前
|
Java 关系型数据库 数据库
基于SpringBoot大药房管理系统(程序+数据库+文档)
基于SpringBoot大药房管理系统(程序+数据库+文档)
|
1月前
|
JavaScript Java 数据库
基于springboot的地方美食分享网站(程序+数据库+文档)
基于springboot的地方美食分享网站(程序+数据库+文档)
|
1月前
|
JavaScript Java 数据库
基于SpringBoot摄影跟拍预定管理系统(系统+数据库+文档)
基于SpringBoot摄影跟拍预定管理系统(系统+数据库+文档)
|
1月前
|
JavaScript 前端开发 Java
基于SpringBoot的人事管理系统(程序+数据库+文档)
基于SpringBoot的人事管理系统(程序+数据库+文档)
|
1月前
|
数据可视化 Java 测试技术
基于SpringBoot的精品在线试题库系统(系统+数据库+文档)
基于SpringBoot的精品在线试题库系统(系统+数据库+文档)
|
1月前
|
数据可视化 Java 测试技术
基于SpringBoot的毕业生实习与就业管理系统(系统+数据库+文档)
基于SpringBoot的毕业生实习与就业管理系统(系统+数据库+文档)
|
1月前
|
存储 前端开发 安全
酒店客房管理系统设计与实现(代码+数据库+文档)
酒店客房管理系统设计与实现(代码+数据库+文档)

热门文章

最新文章