精品教学教案设计 | Excellent teaching plan
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[course]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[course] GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[courseplan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[courseplan] GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[department]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[department] GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[exam_grade]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[exam_grade] GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[speciality]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[speciality] GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[student] GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[teacher]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[teacher] GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[xxxx]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[xxxx] GO
CREATE TABLE [dbo].[class] ( [code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [name] [varchar] (30) COLLATE Chinese_PRC_CI_AS NOT NULL , [classshort] [varchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
育人犹如春风化雨,授业不惜蜡炬成灰
精品教学教案设计 | Excellent teaching plan
[intime] [datetime] NULL , [speci_code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ) ON [PRIMARY] GO
CREATE TABLE [dbo].[classrooom] ( [code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [capacity] [numeric](18, 0) NULL , [type] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ) ON [PRIMARY] GO
CREATE TABLE [dbo].[course] ( [code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [name] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [period] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL , [number] [numeric](18, 0) NULL , [credithour] [numeric](18, 0) NULL ) ON [PRIMARY] GO
CREATE TABLE [dbo].[courseplan] ( [teach_code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [couse_code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [room_code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [tabletime] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL , [week] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ) ON [PRIMARY] GO
CREATE TABLE [dbo].[department] ( [code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [name] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [address] [varchar] (30) COLLATE Chinese_PRC_CI_AS NULL , [telephone] [varchar] (12) COLLATE Chinese_PRC_CI_AS NULL ) ON [PRIMARY] GO
CREATE TABLE [dbo].[exam_grade] ( [code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [kmname] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [stude_code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [kmgrade] [datetime] NULL , [grade] [numeric](18, 0) NULL
育人犹如春风化雨,授业不惜蜡炬成灰
精品教学教案设计 | Excellent teaching plan
) ON [PRIMARY] GO
CREATE TABLE [dbo].[speciality] ( [code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [name] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [spechar] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL , [specshort] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL , [degree] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL , [depar_code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ) ON [PRIMARY] GO
CREATE TABLE [dbo].[student] ( [code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [name] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL , [sex] [varchar] (2) COLLATE Chinese_PRC_CI_AS NULL , [title] [varchar] (16) COLLATE Chinese_PRC_CI_AS NULL , [face] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL , [brithday] [datetime] NULL , [nativeplace] [varchar] (12) COLLATE Chinese_PRC_CI_AS NULL , [address] [varchar] (30) COLLATE Chinese_PRC_CI_AS NULL , [class_code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ) ON [PRIMARY] GO
CREATE TABLE [dbo].[teacher] ( [code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [name] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL , [sex] [varchar] (2) COLLATE Chinese_PRC_CI_AS NULL , [specialiy] [varchar] (16) COLLATE Chinese_PRC_CI_AS NOT NULL , [title] [varchar] (16) COLLATE Chinese_PRC_CI_AS NOT NULL , [birthday] [datetime] NULL , [nativeplace] [varchar] (12) COLLATE Chinese_PRC_CI_AS NULL , [address] [varchar] (30) COLLATE Chinese_PRC_CI_AS NULL ) ON [PRIMARY] GO
CREATE TABLE [dbo].[xxxx] ( [cours_code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [stude_code] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL , [cours_audit] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL , [grade_audit] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ) ON [PRIMARY]
育人犹如春风化雨,授业不惜蜡炬成灰
精品教学教案设计 | Excellent teaching plan
GO
ALTER TABLE [dbo].[class] WITH NOCHECK ADD CONSTRAINT [PK_class] PRIMARY KEY CLUSTERED ( [code] ) ON [PRIMARY] GO
ALTER TABLE [dbo].[classrooom] WITH NOCHECK ADD CONSTRAINT [PK_classrooom] PRIMARY KEY CLUSTERED ( [code] ) ON [PRIMARY] GO
ALTER TABLE [dbo].[course] WITH NOCHECK ADD CONSTRAINT [PK_course] PRIMARY KEY CLUSTERED ( [code] ) ON [PRIMARY] GO
ALTER TABLE [dbo].[department] WITH NOCHECK ADD CONSTRAINT [PK_xi] PRIMARY KEY CLUSTERED ( [code] ) ON [PRIMARY] GO
ALTER TABLE [dbo].[exam_grade] WITH NOCHECK ADD CONSTRAINT [PK_exam_grade] PRIMARY KEY CLUSTERED ( [code] ) ON [PRIMARY] GO
ALTER TABLE [dbo].[speciality] WITH NOCHECK ADD CONSTRAINT [PK_speciality] PRIMARY KEY CLUSTERED ( [code] ) ON [PRIMARY] GO
育人犹如春风化雨,授业不惜蜡炬成灰
精品教学教案设计 | Excellent teaching plan
ALTER TABLE [dbo].[student] WITH NOCHECK ADD CONSTRAINT [PK_student] PRIMARY KEY CLUSTERED ( [code] ) ON [PRIMARY] GO
ALTER TABLE [dbo].[teacher] WITH NOCHECK ADD CONSTRAINT [DF_teacher_sex] DEFAULT ('=男') FOR [sex], CONSTRAINT [PK_teacher] PRIMARY KEY CLUSTERED ( [code] ) ON [PRIMARY] GO
ALTER TABLE [dbo].[class] ADD CONSTRAINT [FK_class_speciality] FOREIGN KEY ( [speci_code] ) REFERENCES [dbo].[speciality] ( [code] ) GO
ALTER TABLE [dbo].[courseplan] ADD CONSTRAINT [FK_courseplan_classrooom] FOREIGN KEY ( [room_code] ) REFERENCES [dbo].[classrooom] ( [code] ), CONSTRAINT [FK_courseplan_course] FOREIGN KEY ( [couse_code] ) REFERENCES [dbo].[course] ( [code] ), CONSTRAINT [FK_courseplan_teacher] FOREIGN KEY ( [teach_code] ) REFERENCES [dbo].[teacher] ( [code] ) GO
育人犹如春风化雨,授业不惜蜡炬成灰