资源预览内容
第1页 / 共4页
第2页 / 共4页
第3页 / 共4页
第4页 / 共4页
亲,该文档总共4页全部预览完了,如果喜欢就下载吧!
资源描述
PowerDesigner设计的PDM模型生成数据库的SQL脚本(数据库名称为testDB),代码如下/*=*/* Database name: 流动人口管理系统PDM */* DBMS name: Microsoft SQL Server 2000 */* Created on: 2008-1-4 10:51:46 */*=*/if exists (select * from odb.sysdatabases where name=TestDB)drop database TestDBgocreate database TestDBgouse TestDBgoif exists (select 1 from sysindexes where id = object_id(TenancyBargin) and name = HouseHost_Contract_FK and indid 0 and indid 0 and indid 0 and indid 255) drop index TenancyHouse.C_Tenancy_FKgoif exists (select 1 from sysobjects where id = object_id(HouseHost) and type = U) drop table HouseHostgoif exists (select 1 from sysobjects where id = object_id(PerMsg) and type = U) drop table PerMsggoif exists (select 1 from sysobjects where id = object_id(TenancyBargin) and type = U) drop table TenancyBargingoif exists (select 1 from sysobjects where id = object_id(TenancyHouse) and type = U) drop table TenancyHousegoif exists (select 1 from sysobjects where id = object_id(managerTab) and type = U) drop table managerTabgo/*=*/* Table: HouseHost */*=*/create table HouseHost ( jID char(10) not null, jname char(10) null, jsex bit null, jbornday datetime null, tel char(50) null, constraint PK_HOUSEHOST primary key (jID)go/*=*/* Table: PerMsg */*=*/create table PerMsg ( yid char(18) not null, name char(8) null, sex bit null, born datetime null, position char(10) null, political char(10) null, stay text null, important char(20) null, studylevel char(20) null, salary char(20) null, socity text null, constraint PK_PERMSG primary key (yid)go/*=*/* Table: TenancyBargin */*=*/create table TenancyBargin ( BarginID char(10) not null, yid char(18) not null, TenancyID char(10) not null, jID char(10) not null, BarginMoney numeric(10,2) null, StartTime datetime null, StopTime datetime null, constraint PK_TENANCYBARGIN primary key (BarginID)go/*=*/* Index: Person_Contract_FK */*=*/create index Person_Contract_FK on TenancyBargin (yid)go/*=*/* Index: HouseHost_Contract_FK */*=
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号