http://download.qt.io/archive/qt/
USE [master]GO/****** Object: Database [BookDB] Script Date: 03/26/2017 10:45:11 ******/CREATE DATABASE [BookDB] ON PRIMARY ( NAME = N'BookDB', FILENAME = N'D:\sql\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\BookDB.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LOG ON ( NAME = N'BookDB_log', FILENAME = N'D:\sql\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\BookDB_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)GOALTER DATABASE [BookDB] SET COMPATIBILITY_LEVEL = 100GOIF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))beginEXEC [BookDB].[dbo].[sp_fulltext_database] @action = 'enable'endGOALTER DATABASE [BookDB] SET ANSI_NULL_DEFAULT OFFGOALTER DATABASE [BookDB] SET ANSI_NULLS OFFGOALTER DATABASE [BookDB] SET ANSI_PADDING OFFGOALTER DATABASE [BookDB] SET ANSI_WARNINGS OFFGOALTER DATABASE [BookDB] SET ARITHABORT OFFGOALTER DATABASE [BookDB] SET AUTO_CLOSE OFFGOALTER DATABASE [BookDB] SET AUTO_CREATE_STATISTICS ONGOALTER DATABASE [BookDB] SET AUTO_SHRINK OFFGOALTER DATABASE [BookDB] SET AUTO_UPDATE_STATISTICS ONGOALTER DATABASE [BookDB] SET CURSOR_CLOSE_ON_COMMIT OFFGOALTER DATABASE [BookDB] SET CURSOR_DEFAULT GLOBALGOALTER DATABASE [BookDB] SET CONCAT_NULL_YIELDS_NULL OFFGOALTER DATABASE [BookDB] SET NUMERIC_ROUNDABORT OFFGOALTER DATABASE [BookDB] SET QUOTED_IDENTIFIER OFFGOALTER DATABASE [BookDB] SET RECURSIVE_TRIGGERS OFFGOALTER DATABASE [BookDB] SET DISABLE_BROKERGOALTER DATABASE [BookDB] SET AUTO_UPDATE_STATISTICS_ASYNC OFFGOALTER DATABASE [BookDB] SET DATE_CORRELATION_OPTIMIZATION OFFGOALTER DATABASE [BookDB] SET TRUSTWORTHY OFFGOALTER DATABASE [BookDB] SET ALLOW_SNAPSHOT_ISOLATION OFFGOALTER DATABASE [BookDB] SET PARAMETERIZATION SIMPLEGOALTER DATABASE [BookDB] SET READ_COMMITTED_SNAPSHOT OFFGOALTER DATABASE [BookDB] SET HONOR_BROKER_PRIORITY OFFGOALTER DATABASE [BookDB] SET READ_WRITEGOALTER DATABASE [BookDB] SET RECOVERY FULLGOALTER DATABASE [BookDB] SET MULTI_USERGOALTER DATABASE [BookDB] SET PAGE_VERIFY CHECKSUMGOALTER DATABASE [BookDB] SET DB_CHAINING OFFGOEXEC sys.sp_db_vardecimal_storage_format N'BookDB', N'ON'GOUSE [BookDB]GO/****** Object: Table [dbo].[Reader] Script Date: 03/26/2017 10:45:11 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE [dbo].[Reader]([readerNo] [nchar](10) NOT NULL,[readerName] [nchar](10) NULL,[sex] [nchar](10) NULL,[identitycard] [nchar](10) NULL,[workUnit] [nchar](10) NULL, CONSTRAINT [PK_Reader] PRIMARY KEY CLUSTERED ([readerNo] 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].[Borrow] Script Date: 03/26/2017 10:45:11 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE [dbo].[Borrow]([readerNo] [nchar](10) NULL,[bookNo] [nchar](10) NULL,[borrowDate] [datetime] NULL,[shouldDate] [datetime] NULL,[returnDate] [datetime] NULL) ON [PRIMARY]GO/****** Object: Table [dbo].[BookClass] Script Date: 03/26/2017 10:45:11 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE [dbo].[BookClass]([classNo] [nchar](10) NOT NULL,[className] [nchar](10) NULL, CONSTRAINT [PK_BookClass] PRIMARY KEY CLUSTERED ([classNo] 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].[Book] Script Date: 03/26/2017 10:45:11 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE [dbo].[Book]([bookNo] [nchar](10) NOT NULL,[classNo] [nchar](10) NULL,[bookName] [nchar](10) NULL,[authorName] [nchar](10) NULL,[publishingNo] [nchar](10) NULL,[price] [money] NULL,[publishingDate] [nchar](10) NULL,[shopDate] [datetime] NULL,[shopNum] [int] NULL, CONSTRAINT [PK_Book] PRIMARY KEY CLUSTERED ([bookNo] 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: ForeignKey [FK_Book_BookClass] Script Date: 03/26/2017 10:45:11 ******/ALTER TABLE [dbo].[Book] WITH CHECK ADD CONSTRAINT [FK_Book_BookClass] FOREIGN KEY([classNo])REFERENCES [dbo].[BookClass] ([classNo])GOALTER TABLE [dbo].[Book] CHECK CONSTRAINT [FK_Book_BookClass]GO