【转】MS Visio Professional 生成sql

Visio支持数据库建模,但是professional版本不包含正向工程功能,即无法生成sql。这真是令人痛恨,还好有OrthogonalToolBox这样的工具。这是一个非常有趣的软件,安装之后它并没有程序菜单项,无法直接启动,而是在其它应用程序里增加一个工具条。

可以在OrthogonalToolBox  里打开一个visio建立的数据库模型,然后将其导出成xml,并选择"ER to SQL XSLT Transform"这个xslt作为style。然后在IE里打开这个XML,就可以看到sql代码了。

这个XSLT是为MS SQL Server设计的,但是将其修改成生成其它数据库的sql也很简单,或者直接在生成的sql文本上做正则表达式替换也是个不错的主意。  

 

http://blog.csdn.net/pinxue/archive/2006/10/05/1322090.aspx

 

 

Installation Instructions
To install Orthogonal Toolbox:

  1. Download the zip file and extract the contents of the zip file to any (temporary) location.
  2. Run (Start | Run… then Browse… to the extract location) setup.exe.
  3. Follow the instructions of the installation utility.
  4. Once installation is complete, you can access Orthogonal Toolbox by opening/creating an ORM Source Model and/or a Database Model Diagram within Visio.
  5. Look for the toolbar titled “Orthogonal Toolbox”. If the toolbar is not visible, it can be made visible via View | Toolbars | Orthogonal Toolbox.
  6. Once the toolbar is visible, you can use the utility by clicking the button labeled “Orthogonal Toolbox”.
posted on 2011-04-29 11:23  Peter Zhang  阅读(1817)  评论(0编辑  收藏  举报