首先还是先打开我们的PowerDesigner,打开我们要导出的项目
点击Report-->Reports templates 进入Report模版页面
点击最右边的 文件夹图标,进入选择页面,找到我们下载的模版文件(我的在E:\备用内,到文件夹那一层就好),选好以后点击'确定',然后再点击'close'关闭
点击Report-->Generate Reports 进入导出页面
依照图片选择(备注:Generate html导出的是一个html格式的),还有就是不要忘记设置为简体中文
在file name 处,进行设置导出文件的位置以及名称,点击 'ok'导出,就可以导出文件了
弹出以下信息说明导出成功,打开查看导出文档
一、选择菜单栏上database
二、更改当前数据库类型>>change current dbms 按钮
三、将当前的dbms更改成需要的dbms(如果用的就是当前的mysql5.0就无需更换)
四、选择database菜单栏下 >>generate database
五、设置导出.sql名字和路劲
六、导出的sql是没有注释的,如果需要注释
tools >>excute commands >> edit/run script打开的窗口中添加以下信息
'******************************************************************************
'* file: name2comment.vbs
'* purpose: database generation cannot use object names anymore
' in version 7 and above.
' it always uses the object codes.
'
' in case the object codes are not aligned with your
' object names in your model, this script will copy
' the object name onto the object comment for
' the tables and columns.
'
'* title:
'* version: 1.0
'* company: sybase inc.
'******************************************************************************
option explicit
validationmode = true
interactivemode = im_batch
dim mdl ' the current model
' get the current active model
set mdl = activemodel
if (mdl is nothing) then
msgbox "there is no current model "
elseif not mdl.iskindof(pdpdm.cls_model) then
msgbox "the current model is not an physical data model. "
else
processfolder mdl
end if
' this routine copy name into comment for each table, each column and each view
' of the current folder
private sub processfolder(folder)
dim tab 'running table
for each tab in folder.tables
if not tab.isshortcut then
'把表明作为表注释,其实不用这么做
tab.comment = tab.name
dim col ' running column
for each col in tab.columns
'把列name和comment合并为comment
col.comment= col.name
next
end if
next
dim view 'running view
for each view in folder.views
if not view.isshortcut then
view.comment = view.name
end if
next
' go into the sub-packages
dim f ' running folder
for each f in folder.packages
if not f.isshortcut then
processfolder f
end if
next
end sub
执行。再执行步骤一到步骤五
Photoshop|
Dreamweaver|
SVG|
WebGL|
Visual Studio|
PowerDesigner|
Eclipse|
Git|
Apache Ant|
Atom|
Composer|
CodeSmith|
Flex|
Gradle|
Maven|
Sublime Text3|
SVN|
Tableau|
Vim|
Chrome开发者工具|
OpenGL|
Unity|
Direct3D|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....