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 ...
随机推荐
- [TypeScript] Use the TypeScript "unknown" type to avoid runtime errors
The "any" type can be very useful, especially when adding types to an existing JavaScript ...
- Block系列2:Block内存管理
ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UIViewController { UIImag ...
- Django——模版Template报错
>>> from django.template import Template >>> t = Template("My name is {{ my_n ...
- Django开发博客(七)——markdown优化
背景 上一次把markdown集成之后.发现还是有非常多问题. 这次须要做一些优化. 1.markdown与普通文本的差别显示. 2.添加点击量的统计 3.加入名片卡的滑动 版本号相关 操作系统:Ma ...
- 由friend用法引出的声明与定义那些事儿
今天遇到了一个问题,大致描述一下就是有两个类A和B.我想达到如下效果:B是A的友元,同时A是B的类类型成员. 第一次尝试,在B.h中包含A.h,在A.h中包含B.h,在A类中声明friend clas ...
- C/C++ linux下光标定位和清屏函数
printf("\033[47;31mhello world\033[5m"); 47是字背景颜色, 31是字体的颜色, hello world是字符串. 后面的\033[5m是 ...
- SQL Server 2008R2发布与订阅的配置
使用SQL Server的发布与订阅可以将一个数据库的数据实时传送到另一个数据库中,使用这种方式与Link Server相比可以减少对数据库的连接次数.下面介绍SQL Server 2008R2发布与 ...
- jQuery框架源码解读
1.jQuery 1.9.1 parseJSON: function( data ) { // Attempt to parse using the native JSON parser first ...
- "《 Serial Drivers 》by Alessandro Rubini" 学习笔记
Introduction to "serial device driver" (My study note) 膜拜大神的作品. Standing on the should ...
- android studio - 隐藏编辑器上面的导航条
菜单栏-“View”-"Navigation Bar"