if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[图书丢失_图书编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[图书丢失] DROP CONSTRAINT 图书丢失_图书编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_图书罚款_图书信息]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[图书罚款] DROP CONSTRAINT FK_图书罚款_图书信息
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[图书归还_图书编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[图书归还] DROP CONSTRAINT 图书归还_图书编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[图书借阅_图书编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[图书借阅] DROP CONSTRAINT 图书借阅_图书编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_图书征订_图书信息]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[图书征订] DROP CONSTRAINT FK_图书征订_图书信息
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[图书注销_图书编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[图书注销] DROP CONSTRAINT 图书注销_图书编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[期刊丢失_期刊编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[期刊丢失] DROP CONSTRAINT 期刊丢失_期刊编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_期刊罚款_期刊信息]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[期刊罚款] DROP CONSTRAINT FK_期刊罚款_期刊信息
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_期刊罚款_读者信息]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[期刊罚款] DROP CONSTRAINT FK_期刊罚款_读者信息
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_图书罚款_读者信息]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[图书罚款] DROP CONSTRAINT FK_图书罚款_读者信息
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_读者信息_读者类型]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[读者信息] DROP CONSTRAINT FK_读者信息_读者类型
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_图书借阅]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_图书借阅]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_图书归还]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_图书归还]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_图书征订]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_图书征订]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[书架]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[书架]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[供应商]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[供应商]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[出版社]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[出版社]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[图书丢失]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[图书丢失]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[图书信息]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[图书信息]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[图书借阅]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[图书借阅]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[图书归还]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[图书归还]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[图书征订]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[图书征订]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[图书注销]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[图书注销]
GO
if exi�