数据库课程设计-教务管理系统[1](3)

2019-03-11 14:36

留个模块构成,建立它们各自内部的列属性,并相互关联它们彼此之间的关系,最后到完善的教务管理系统。(模型结构图如下)

教务管理系统模型图

四、调试分析:

10

教务管理系统详细设计代码如下:

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('Classmangement') and o.name 'FK_CLASSMAN_RELATIONS_DEPARTME') alter table Classmangement

drop constraint FK_CLASSMAN_RELATIONS_DEPARTME go

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('GradeManagement') and o.name 'FK_GRADEMAN_RELATIONS_STUDENTM') alter table GradeManagement

drop constraint FK_GRADEMAN_RELATIONS_STUDENTM go

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('GradeManagement') and o.name 'FK_GRADEMAN_RELATIONS_COURSEIN') alter table GradeManagement

drop constraint FK_GRADEMAN_RELATIONS_COURSEIN go

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('TeachManage') and o.name 'FK_TEACHMAN_RELATIONS_COURSEIN') alter table TeachManage

drop constraint FK_TEACHMAN_RELATIONS_COURSEIN go

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('TeachManage') and o.name 'FK_TEACHMAN_RELATIONS_TEACHERM') alter table TeachManage

drop constraint FK_TEACHMAN_RELATIONS_TEACHERM go

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('TeacherManage') and o.name

11

=

=

=

=

=

=

'FK_TEACHERM_RELATIONS_COURSEIN') alter table TeacherManage

drop constraint FK_TEACHERM_RELATIONS_COURSEIN go

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('studentmanage') and o.name = 'FK_STUDENTM_RELATIONS_DEPARTME') alter table studentmanage

drop constraint FK_STUDENTM_RELATIONS_DEPARTME go

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('studentmanage') and o.name = 'FK_STUDENTM_RELATIONS_CLASSMAN') alter table studentmanage

drop constraint FK_STUDENTM_RELATIONS_CLASSMAN go

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')

where r.fkeyid = object_id('教材使用') and o.name = 'FK_教材使用_教材使用_COURSEIN') alter table 教材使用

drop constraint FK_教材使用_教材使用_COURSEIN go

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')

where r.fkeyid = object_id('教材使用') and o.name = 'FK_教材使用_教材使用2_SBMANAGE') alter table 教材使用

drop constraint FK_教材使用_教材使用2_SBMANAGE go

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')

where r.fkeyid = object_id('教材发放') and o.name = 'FK_教材发放_教材发放_STUDENTM') alter table 教材发放

drop constraint FK_教材发放_教材发放_STUDENTM go

if exists (select 1

from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')

12

where r.fkeyid = object_id('教材发放') and o.name = 'FK_教材发放_教材发放2_SBMANAGE') alter table 教材发放

drop constraint FK_教材发放_教材发放2_SBMANAGE go

if exists (select 1

from sysindexes

where id = object_id('Classmangement') and name = 'Relationship_7_FK' and indid > 0 and indid < 255)

drop index Classmangement.Relationship_7_FK go

if exists (select 1

from sysobjects

where id = object_id('Classmangement') and type = 'U') drop table Classmangement go

if exists (select 1

from sysobjects

where id = object_id('Courseinformationform') and type = 'U')

drop table Courseinformationform go

if exists (select 1

from sysobjects

where id = object_id('Departmentform') and type = 'U') drop table Departmentform go

if exists (select 1

from sysindexes

where id = object_id('GradeManagement') and name = 'Relationship_5_FK' and indid > 0 and indid < 255)

drop index GradeManagement.Relationship_5_FK go

13

if exists (select 1

from sysindexes

where id = object_id('GradeManagement') and name = 'Relationship_3_FK' and indid > 0 and indid < 255)

drop index GradeManagement.Relationship_3_FK go

if exists (select 1

from sysobjects

where id = object_id('GradeManagement') and type = 'U') drop table GradeManagement go

if exists (select 1

from sysobjects

where id = object_id('SBMANAGE') and type = 'U') drop table SBMANAGE go

if exists (select 1

from sysindexes

where id = object_id('TeachManage') and name = 'Relationship_9_FK' and indid > 0 and indid < 255)

drop index TeachManage.Relationship_9_FK go

if exists (select 1

from sysindexes

where id = object_id('TeachManage') and name = 'Relationship_8_FK' and indid > 0 and indid < 255)

drop index TeachManage.Relationship_8_FK go

if exists (select 1

from sysobjects

where id = object_id('TeachManage')

14


数据库课程设计-教务管理系统[1](3).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:基于ansys的主减壳体分析

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: