以文本方式查看主题

-  蓝色快车PB俱乐部论坛  (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspindex.asp)
--  PowerDesigner  (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspbbs.asp?boardid=6)
----  求助:我用PD生成的数据库怎么无外键关系呢?  (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspdispbbs.asp?boardid=6&rootid=3838&id=3838)


--  作者:kellycheng
--  发布时间:2006/6/13 11:48:46

--  求助:我用PD生成的数据库怎么无外键关系呢?
我用PD生成的数据库怎么无外键关系呢?
用的 SQLServer 2000

但是我单独新建CDM,生成PDM,再生DB Script 都有外键关系.
alter table Users
   add constraint FK_USERS_RELATIONS_POSTLIST foreign key (PostID)
      references PostList (PostID)
go

create table checkin_chi (
   cid                  int                  not null,
   checkinid            int                  not null,
   quan                 int                  null,
   constraint PK_CHECKIN_CHI primary key  (cid, checkinid),
   constraint FK_CHECKIN__RELATIONS_COMMODIT foreign key (cid)
      references commodity (cid),
   constraint FK_CHECKIN__RELATIONS_CHECKIN_ foreign key (checkinid)
      references checkin_mas (checkinid)
)
go


">