【正文】
delete foreign key FK_客戶 _RELATIONS_登錄 end if。 /*==============================================================*/ /* Table: 登錄 */ /*==============================================================*/ create table 登錄 ( 管理員登錄 tinyint null, 客戶登錄 tinyint null, 客戶注冊(cè) tinyint null )。FK_ADMINIST_RELATIONS_登錄 39。 if exists(select 1 from where role=39。) then alter table 機(jī)票管理 14 delete foreign key FK_機(jī)票管理 _RELATIONS_ADMINIST end if。FK_ 查詢(xún)_RELATIONS_ADMINIST39。 if exists(select 1 from where role=39。) then alter table 用戶交流平臺(tái) delete foreign key FK_用戶交流平臺(tái) _RELATIONS_ADMINIST end if。FK_航班信息管理_RELATIONS_ADMINIST39。 if exists(select 1 from where role=39。) then alter table 訂票 delete foreign key FK_訂票 _RELATIONS_ADMINIST end if。FK_ 退票_RELATIONS_ADMINIST39。 drop index if exists 。 drop table if exists Administrator。 /*==============================================================*/ /* Index: Administrator_PK */ /*==============================================================*/ 16 create unique index Administrator_PK on Administrator ( 更改賬戶 ID ASC )。 alter table Administrator add constraint FK_ADMINIST_RELATIONS_登錄 foreign key () references 登錄 on update restrict on delete restrict。FK_客戶 _RELATIONS_登錄 39。 if exists(select 1 from where role=39。) then alter table 查詢(xún) delete foreign key FK_查詢(xún) _RELATIONS_客戶 end if。FK_ 用 戶 交 流 平 臺(tái)_RELATIONS_客戶 39。 if exists(select 1 from where role=39。) then alter table 訂票 delete foreign key FK_訂票 _RELATIONS_客戶 end if。FK_退票 _RELATIONS_客戶 39。 drop index if exists 客戶 .Relationship_1_FK。 drop table if exists 客戶 。 /*==============================================================*/ /* Index: 客戶 _PK */ /*==============================================================*/ create unique index 客戶 _PK on 客戶 ( 更改賬戶 ASC )。 19 alter table 客戶 add constraint FK_客戶 _RELATIONS_登錄 foreign key () references 登錄 on update restrict on delete restrict。FK_ 機(jī)票管理_RELATIONS_ADMINIST39。 drop index if exists 機(jī)票管理 .Relationship_6_FK。 /*==============================================================*/ /* Table: 機(jī)票管理 */ /*==============================================================*/ create table 機(jī)票管理 ( 更改賬戶 ID integer null, 添加可預(yù)訂機(jī)票 tinyint not null, 刪除機(jī)票 tinyint not null )。 alter table 機(jī)票管理 add constraint FK_機(jī)票管理 _RELATIONS_ADMINIST foreign key (更改賬戶ID) references Administrator (更改賬戶 ID) on update restrict on delete restrict。FK_ 航 班 信 息 管 理_RELATIONS_ADMINIST39。 drop index if exists 航班信息管理 .Relationship_7_FK。 /*==============================================================*/ /* Table: 航 班 信 息 管 理 */ /*=========================================================== 21 ===*/ create table 航班信息管理 ( 更改賬戶 ID integer null, 航線信息 tinyint null, 艙位信息 tinyint null )。 alter table 航班信息管理 add constraint FK_航班信息管理 _RELATIONS_ADMINIST foreign key (更改賬戶 ID) references Administrator (更改賬戶 ID) on update restrict on delete restrict。FK_ 查詢(xún)_RELATIONS_ADMINIST39。 22 if exists(select 1 from where role=39。) then alter table 查詢(xún) delete foreign key FK_查 詢(xún) _RELATIONS_客戶 end if。 drop index if exists 查詢(xún) .Relationship_5_FK。 /*==============================================================*/ /* Table: 查詢(xún) */ /*==============================================================*/ creat