PowerDesigner之设置(1)
这里用到的数据库为SQL2000。
PowerDesigner 16.
原始格式:
(个人认为的缺点)
- 创建表前先将原来的表删除(创建表逻辑,假如存在则drop。假如原来有数据,用drop就有问题。新的逻辑为假如存在则不创建。)
- 表名无中文名显示
- 列名无中文名显示
if exists (select 1 from sysobjects where id = object_id('table1') and type = 'U')
drop table table1
go
/*==============================================================*/
/* Table: table1 */
/*==============================================================*/
create table table1(
XH int not null,
constraint PK_table1 primary key (XH)
)
Go
新格式:
/*==============================================================*/
/* Table: table1 表1 */
/*==============================================================*/
if not exists (select 1 from sysobjects where id = object_id('table1') and type = 'U')
create table table1 (
XH int not null ,--序号,
constraint PK_table1 primary key (XH)
)
Go
设置点:
- 修改table的create中Value值
主菜单DataBase->Edit Current DBMS->Script->Objects->Table->Create中Value值 修改。
原:
create table [%QUALIFIER%]%TABLE% (
%TABLDEFN%
)
[%OPTIONS%]
新:
/*==============================================================*/
/* Table: %18:Code%%30:Name% */
/*==============================================================*/
if not exists (select 1 from sysobjects where id = object_id('[%QUALIFIER%]%TABLE%') and type = 'U')
create table [%QUALIFIER%]%TABLE% (
%TABLDEFN%
)
[%OPTIONS%]
上面代码中%num中num表示长度。
而后将原table的title(原来不带中文表名部分内容)去掉。这里用了个笨方法,如哪位有高招,请赐教。由于Name为中文,导致后面的*/对齐有问题,目前还没有解决,望高手赐教。注意,这里要设置Encoding(主菜单DataBase->Generate DataBase->Format)为GB2312.
路径:主菜单DataBase->Generate DataBase->Format->Title勾掉。
将原来drop table判断部分去掉。
路径:主菜单DataBase->Generate DataBase->Options中Table&Column部分Drop Table去掉。如下图
- 添加列备注
修改Column的Add中Value值
主菜单DataBase->Edit Current DBMS->Script->Objects->Column->Add中value值。
原:
%20:COLUMN% [%COMPUTE%?AS (%COMPUTE%):%20:DATATYPE%[.Z:[ collate %ExtCollation%][%ExtRowGuidCol%? RowGuidCol][%IDENTITY%? %IDENTITY%[[(%ExtIdentitySeedInc%)][%ExtIdtNotForReplication%? not for replication]]:[%ExtNullConstName%? constraint %ExtNullConstName%][ %:NULL%][ %:NOTNULL%]][[%ExtDeftConstName%? constraint %ExtDeftConstName%] default %:DEFAULT%]]--%COLNNAME%
[%CONSTDEFN%]]
新:
%20:COLUMN% [%COMPUTE%?AS (%COMPUTE%):%20:DATATYPE%[.Z:[ collate %ExtCollation%][%ExtRowGuidCol%? RowGuidCol][%IDENTITY%? %IDENTITY%[[(%ExtIdentitySeedInc%)][%ExtIdtNotForReplication%? not for replication]]:[%ExtNullConstName%? constraint %ExtNullConstName%][ %20:NULL%][ %20:NOTNULL%]][[%ExtDeftConstName%? constraint %ExtDeftConstName%] default %20:DEFAULT%]][%20:CONSTDEFN%]],--%COLNNAME%
主要为添加--%COLNNAME%注释,前面%20中添加20为了格式对齐。
PowerDesigner之设置(1)的更多相关文章
- PowerDesigner 15设置mysql主键自动增长及基数
PowerDesigner 15设置mysql主键自动增长及基数 1.双击标示图,打开table properties->columns, 如图点击图标Customize Columns an ...
- Powerdesigner颜色设置
Powerdesigner颜色设置
- PowerDesigner常用设置
使用powerdesigner进行数据库设计确实方便,以下是一些常用的设置 附加:工具栏不见了 调色板(Palette)快捷工具栏不见了 PowerDesigner 快捷工具栏 palette 不见了 ...
- PowerDesigner之设置(2)——扩展属性
数据库:SQL2000 PD版本:16 在PowerDesigner之设置(1)中,创建表的表头注释部分由于中文的原因无法定长,这里我们用PD的扩展方法来解决. 具体方法如下: 主菜单DataBase ...
- PowerDesigner之设置(3)——根据Name首字母生成Code
SQL版本:2000 PowerDesigner版本:16 网上有不少介绍 PowerDesigner Name/Code自动调整 的文章,但基本如出一辙. 这里,我就介绍下如何根据输入的Name根据 ...
- PowerDesigner 常用设置
1.使用 JDBC 方式连接 Oracle 逆向生成数据库 PDM 使用 ODBC 方式连接 Oracle 数据库可以借鉴这位兄弟的博客:http://www.cnblogs.com/clivehua ...
- powerDesigner 一些设置
常用设置 table中需要显示的内容 --------------------------------------------------------------------------------- ...
- powerdesigner怎么设置同时显示name和code
实现方法:Tools-Display Preference 从数据库里抽取了数据模型,为了理清思路,需要将name改为中文名称,但是pd自动将name填充为code,可以通过如下配置修改: 选择too ...
- PowerDesigner设置默认值名称规则
一.需求背景: 使用PowerDesigner创建表时,若设置某列默认值时,自动生成规则的默认值名称.比如说:DF_表名_列名 二.设置步骤: 1.选择Database—>Edit Curren ...
随机推荐
- Python学习笔记(七)函数的使用
python中的函数使用较简单,这里列出值得注意的几点: 内嵌函数 例如: # coding: utf-8 def foo(): def bar(): print 'bar() called. ...
- DirectShow控制台输出和保存视频设备名称
#include "windows.h" #include "TCHAR.h" #include <dshow.h> #include <ve ...
- JSON--百度百科
JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式.它基于ECMAScript的一个子集. JSON采用完全独立于语言的文本格式,但是也使用了类似于C语言家族 ...
- iOS 物流信息时间轴
代码地址如下:http://www.demodashi.com/demo/11958.html timelineLogistics 是模仿淘宝物流信息时间轴界面的自定义View 准备工作 引入Maso ...
- NSDate相差8小时
NSDate *date = [NSDate date]; NSTimeZone *zone = [NSTimeZone systemTimeZone]; NSInteger interval = ...
- ASP.NET MVC:创建 ModelBinder 自动 Trim 所有字符串
ASP.NET MVC:创建 ModelBinder 自动 Trim 所有字符串 2010-12-29 21:32 by 鹤冲天, 4289 阅读, 14 评论, 收藏, 编辑 用户输入的字符串前后的 ...
- MVC 实现表格数据导出Excel(NPOI方式)
前端View(@ViewBag为查询条件): <span id="exprobtn" class="btn_blue" style="dispa ...
- dos指令 批处理文件
windows下开发的时候难免写一些脚本,脚本的调用又难以避免的写批处理文件,也就是(.bat)文件!这个文件是什么呢?其实就是以下的这些dos命令.以下是从网上摘抄的,留以记录,待以后需要时查阅.也 ...
- PILE读书笔记_文件I/O
open函数 int open(const char *pathname, int flags, mode_t mode); 参数说明: (1)pathname: 表示要打开的文件路径 (2)flag ...
- win7安装RabbitMQ
1.下载并安装erlang http://www.erlang.org/downloads 2.下载并安装RabbitMQ http://www.rabbitmq.com/install-window ...