The MySQL Workbench can nicely generate a Entity Relationship model from your existing MySQL Database. After Installing click in the column labelled “Data Modelling” on the link below to “Create EER model from existing database”. Follow the wizard to have a generated diagram including your existing tables and their related information. Don’t forget to save the new ER model as *.mwb file.
For Documentation in a project is Confluence as Wiki very good compared to other ones like MediaWiki.
I have written a small plugin to MySQL Workbench as Lua Script to generate Database Model Documentation as Confluence Markup. If you are interested look here for Documentation about the available classes to use in your own scripts.
Part of the generated output from the sample database world from MySQL shown as result in Confluence:
Howto:
- Download this Script
- Start your MySQL Workbench
- Choose from the “scripting” menu the entry “Install Plugin/Module…”
- Change Drop down in the Dialog to File type ”lua Files..”
- Choose downloaded File and click open
- Restart Workbench
- Open previously generated ER model file *.mwb
- Choose from the “Plugins” menu the entry “Catalog” and their the new entry “Confluence Markup Exporter…”
- Markup is now in the clipboard
- Open in Confluence an existing page or create a new onw
- Click on “Edit” button and go to tab “Wiki Markup”
- Paste the generated documentation and click on “save” button
本文介绍了如何利用MySQLWorkbench创建来自现有数据库的实体关系模型,并通过一个自定义Lua脚本将数据库模型文档化为Confluence格式。展示了从样本数据库世界生成的Confluence页面输出,提供了详细的步骤和代码示例。


1万+

被折叠的 条评论
为什么被折叠?



