【正文】
教師 (教師編號)goalter table 上課 add constraint FK_上課_上課2_課程 foreign key (課程_課程號) references 課程 (課程號)goalter table 上課 add constraint FK_上課_上課3_教室 foreign key (教室_教室編號) references 教室 (教室編號)goalter table 學生 add constraint FK_學生_RELATIONS_院系 foreign key (院系_院系號2) references 院系 (院系號)goalter table 學生 add constraint FK_學生_屬于_院系 foreign key (院系_院系號) references 院系 (院系號)goalter table 教室 add constraint FK_教室_位置于_教學樓 foreign key (教學樓_教學樓號) references 教學樓 (教學樓號)goalter table 教室借用 add constraint FK_教室借用_教室借用_學生 foreign key (學號) references 學生 (學號)goalter table 教室借用 add constraint FK_教室借用_教室借用2_教室 foreign key (教室_教室編號) references 教室 (教室編號)goalter table 教師 add constraint FK_教師_隸屬于_院系 foreign key (院系號) references 院系 (院系號)go。) and type = 39。) drop table 課程goif exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table 教師goif exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table 教室借用goif exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table 教室goif exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table 教學樓goif exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table 學生goif exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table 上課goif exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table Association_3goif exists (select 1 from sysobjects where id = object_id(39。) and type = 39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysobjects where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes wh