目录
配置简介和软件条件
数据库附件配置
vs应用程序web.config配置数据库链接字符串
数据库文件脚本代码
配置简介和软件条件
所需要的软件是Vs2017以上数据库是Sqlserver2012以上,如果数据库附件不了可以使用数据库脚本附件数据库脚本会在文章末尾写出来。可以直接复制到数据库哪里创建TushuManger执行
首先拿到源码后解压文件会得到8个目录,除了文件夹以外另外两个.ldf和.mdf文件是数据库
源码可以直接点击文件夹TuShuManger文件里面的TuShuManger.sln
数据库附件配置
打开sqlerver2019右键数据库哪里选择附件后,添加上对应的数据库.mdf文件
vs应用程序web.config配置数据库链接字符串
打开目录里面的TuShuManger.sln后点击文件web.config,然后配置里面参数,datasource是数据库服务器地址,Initial Catalog是数据库名称
数据库文件脚本代码
USE [TuShuManger]
GO
/****** Object: Table [dbo].[ReaderManger] Script Date: 11/28/2023 20:43:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ReaderManger](
[Id] [int] IDENTITY(1,1) NOT NULL,
[rmnum] [nvarchar](max) NULL,
[rmname] [nvarchar](max) NULL,
[rmljnum] [nvarchar](max) NULL,
[rmphone] [nvarchar](max) NULL,
[rmsex] [nvarchar](max) NULL,
[rmsr] [nvarchar](max) NULL,
[rmcatgoryid] [nvarchar](max) NULL,
[rmyx] [nvarchar](max) NULL,
[rmyue] [nvarchar](max) NULL,
[rmbj] [nvarchar](max) NULL,
[rmyxq] [nvarchar](max) NULL,
[rmsfz] [nvarchar](max) NULL,
[rmemail] [nvarchar](max) NULL,
[rmaddress] [nvarchar](max) NULL,
[rmbeiz] [nvarchar](max) NULL,
[idate] [nvarchar](max) NULL,
[xtdate] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'读者编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmnum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'读者姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmname'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'手机号码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmphone'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'读者性别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmsex'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生日' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmsr'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'读者类别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmcatgoryid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'院系' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmyx'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'余额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmyue'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班级' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmbj'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'有效期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmyxq'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'身份证号码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmsfz'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电子邮件' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmemail'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'通讯地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmaddress'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'rmbeiz'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登记日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'idate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'条数时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger', @level2type=N'COLUMN',@level2name=N'xtdate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'读者表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderManger'
GO
/****** Object: Table [dbo].[ReaderCatgory] Script Date: 11/28/2023 20:43:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ReaderCatgory](
[Id] [int] IDENTITY(1,1) NOT NULL,
[rname] [nvarchar](max) NULL,
[rnum] [nvarchar](max) NULL,
[rday] [nvarchar](max) NULL,
[rxnum] [nvarchar](max) NULL,
[idate] [nvarchar](max) NULL,
[xtdate] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'读者类型名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderCatgory', @level2type=N'COLUMN',@level2name=N'rname'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'借书次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderCatgory', @level2type=N'COLUMN',@level2name=N'rnum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'借书天数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderCatgory', @level2type=N'COLUMN',@level2name=N'rday'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'续借次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderCatgory', @level2type=N'COLUMN',@level2name=N'rxnum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderCatgory', @level2type=N'COLUMN',@level2name=N'idate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'条数时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderCatgory', @level2type=N'COLUMN',@level2name=N'xtdate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'读者分类表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ReaderCatgory'
GO
/****** Object: Table [dbo].[OutDate] Script Date: 11/28/2023 20:43:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OutDate](
[Id] [int] IDENTITY(1,1) NOT NULL,
[onum] [nvarchar](max) NULL,
[xtdate] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'超期罚款金额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OutDate', @level2type=N'COLUMN',@level2name=N'onum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'条数时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OutDate', @level2type=N'COLUMN',@level2name=N'xtdate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'超期罚款金额表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OutDate'
GO
/****** Object: Table [dbo].[DataBaseTable] Script Date: 11/28/2023 20:43:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DataBaseTable](
[Id] [int] IDENTITY(1,1) NOT NULL,
[bname] [nvarchar](max) NULL,
[bnum] [nvarchar](max) NULL,
[Parent] [nvarchar](max) NULL,
[bidate] [nvarchar](max) NULL,
[btdate] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[BoReturn] Script Date: 11/28/2023 20:43:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BoReturn](
[Id] [int] IDENTITY(1,1) NOT NULL,
[brbnum] [nvarchar](max) NULL,
[brbname] [nvarchar](max) NULL,
[brrnum] [nvarchar](max) NULL,
[brrname] [nvarchar](max) NULL,
[brbdate] [nvarchar](max) NULL,
[brrdate] [nvarchar](max) NULL,
[brsj] [nvarchar](max) NULL,
[bryqts] [nvarchar](max) NULL,
[bryqfj] [nvarchar](max) NULL,
[brcbs] [nvarchar](max) NULL,
[brzt] [nvarchar](max) NULL,
[brhsrq] [nvarchar](max) NULL,
[brtdate] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'brbnum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'brbname'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'读者编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'brrnum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'读者姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'brrname'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'借出日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'brbdate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'应还日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'brrdate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书单价' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'brsj'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'逾期天数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'bryqts'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'逾期罚金' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'bryqfj'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'brzt'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'还书日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'brhsrq'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库条数增加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn', @level2type=N'COLUMN',@level2name=N'brtdate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书借还查询表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BoReturn'
GO
/****** Object: Table [dbo].[BookManger] Script Date: 11/28/2023 20:43:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BookManger](
[Id] [int] IDENTITY(1,1) NOT NULL,
[bmmnum] [nvarchar](max) NULL,
[bmmname] [nvarchar](max) NULL,
[bmimg] [nvarchar](max) NULL,
[bmtxm] [nvarchar](max) NULL,
[bmssh] [nvarchar](max) NULL,
[bmisbn] [nvarchar](max) NULL,
[bmsl] [nvarchar](max) NULL,
[bmbc] [nvarchar](max) NULL,
[bmdj] [nvarchar](max) NULL,
[bmzz] [nvarchar](max) NULL,
[bmyz] [nvarchar](max) NULL,
[bmzs] [nvarchar](max) NULL,
[bmys] [nvarchar](max) NULL,
[bmcatgoryid] [nvarchar](max) NULL,
[bmcbs] [nvarchar](max) NULL,
[bmidate] [nvarchar](max) NULL,
[bmbeiz] [nvarchar](max) NULL,
[bmtdate] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmmnum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmmname'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书图片' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmimg'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书条形码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmtxm'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书索书号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmssh'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书ISBN' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmisbn'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmsl'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书版次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmbc'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书单价' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmdj'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书作者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmzz'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书译者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmyz'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书字数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmzs'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书页数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmys'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书分类id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmcatgoryid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书出版社' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmcbs'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmbeiz'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登记日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger', @level2type=N'COLUMN',@level2name=N'bmtdate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookManger'
GO
/****** Object: Table [dbo].[BookCatgory] Script Date: 11/28/2023 20:43:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BookCatgory](
[Id] [int] IDENTITY(1,1) NOT NULL,
[bname] [nvarchar](max) NULL,
[bnum] [nvarchar](max) NULL,
[Parent] [nvarchar](max) NULL,
[bidate] [nvarchar](max) NULL,
[btdate] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书分类名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookCatgory', @level2type=N'COLUMN',@level2name=N'bname'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书分离编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookCatgory', @level2type=N'COLUMN',@level2name=N'bnum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'预留字段可删除' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookCatgory', @level2type=N'COLUMN',@level2name=N'Parent'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookCatgory', @level2type=N'COLUMN',@level2name=N'bidate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库插入时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookCatgory', @level2type=N'COLUMN',@level2name=N'btdate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图书分类表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BookCatgory'
GO
/****** Object: Table [dbo].[AdminUser] Script Date: 11/28/2023 20:43:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AdminUser](
[Id] [int] IDENTITY(1,1) NOT NULL,
[username] [nvarchar](max) NULL,
[password] [nvarchar](max) NULL,
[qq] [nvarchar](max) NULL,
[email] [nvarchar](max) NULL,
[phone] [nvarchar](max) NULL,
[sex] [nvarchar](max) NULL,
[idate] [nvarchar](max) NULL,
[xtdate] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AdminUser', @level2type=N'COLUMN',@level2name=N'username'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AdminUser', @level2type=N'COLUMN',@level2name=N'password'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'qq' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AdminUser', @level2type=N'COLUMN',@level2name=N'qq'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮箱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AdminUser', @level2type=N'COLUMN',@level2name=N'email'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'手机' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AdminUser', @level2type=N'COLUMN',@level2name=N'phone'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'性别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AdminUser', @level2type=N'COLUMN',@level2name=N'sex'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登记日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AdminUser', @level2type=N'COLUMN',@level2name=N'idate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库插入日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AdminUser', @level2type=N'COLUMN',@level2name=N'xtdate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户管理员表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AdminUser'
GO
/****** Object: Default [DF__AdminUser__xtdat__1BFD2C07] Script Date: 11/28/2023 20:43:54 ******/
ALTER TABLE [dbo].[AdminUser] ADD DEFAULT (getdate()) FOR [xtdate]
GO
/****** Object: Default [DF__BookCatgo__btdat__1CF15040] Script Date: 11/28/2023 20:43:54 ******/
ALTER TABLE [dbo].[BookCatgory] ADD DEFAULT (getdate()) FOR [btdate]
GO
/****** Object: Default [DF__BookMange__bmtda__1DE57479] Script Date: 11/28/2023 20:43:54 ******/
ALTER TABLE [dbo].[BookManger] ADD DEFAULT (getdate()) FOR [bmtdate]
GO
/****** Object: Default [DF__BoReturn__brtdat__1ED998B2] Script Date: 11/28/2023 20:43:54 ******/
ALTER TABLE [dbo].[BoReturn] ADD DEFAULT (getdate()) FOR [brtdate]
GO
/****** Object: Default [DF__DataBaseT__btdat__1FCDBCEB] Script Date: 11/28/2023 20:43:54 ******/
ALTER TABLE [dbo].[DataBaseTable] ADD DEFAULT (getdate()) FOR [btdate]
GO
/****** Object: Default [DF__OutDate__xtdate__20C1E124] Script Date: 11/28/2023 20:43:54 ******/
ALTER TABLE [dbo].[OutDate] ADD DEFAULT (getdate()) FOR [xtdate]
GO
/****** Object: Default [DF__ReaderCat__xtdat__21B6055D] Script Date: 11/28/2023 20:43:54 ******/
ALTER TABLE [dbo].[ReaderCatgory] ADD DEFAULT (getdate()) FOR [xtdate]
GO
/****** Object: Default [DF__ReaderMan__xtdat__22AA2996] Script Date: 11/28/2023 20:43:54 ******/
ALTER TABLE [dbo].[ReaderManger] ADD DEFAULT (getdate()) FOR [xtdate]
GO