⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bookmanage.sql

📁 网上那个书店开发系统论文,需要的朋友可以下载参考哦
💻 SQL
字号:
/*==============================================================*/
/* Database name:  BookManage                                   */
/* DBMS name:      Microsoft SQL Server 2000                    */
/* Created on:     2005-12-19 15:35:56                          */
/*==============================================================*/




/*==============================================================*/
/* Database: BookManage                                         */
/*==============================================================*/
create database BookManage
go


use BookManage
go


/*==============================================================*/
/* Domain: D_BookFree                                           */
/*==============================================================*/
execute sp_addtype D_BookFree, 'bit'
go


create default D_D_BookFree
    as 0
go


sp_bindefault D_D_BookFree, D_BookFree
go


/*==============================================================*/
/* Domain: D_BookLent                                           */
/*==============================================================*/
execute sp_addtype D_BookLent, 'bit'
go


create default D_D_BookLent
    as 1
go


sp_bindefault D_D_BookLent, D_BookLent
go


/*==============================================================*/
/* Domain: P_Admin                                              */
/*==============================================================*/
execute sp_addtype P_Admin, 'tinyint'
go


create default D_P_Admin
    as 0
go


sp_bindefault D_P_Admin, P_Admin
go


/*==============================================================*/
/* Domain: P_NormalUser                                         */
/*==============================================================*/
execute sp_addtype P_NormalUser, 'tinyint'
go


create default D_P_NormalUser
    as 1
go


sp_bindefault D_P_NormalUser, P_NormalUser
go


/*==============================================================*/
/* Table: BookLent                                              */
/*==============================================================*/
create table BookLent (
   BLId                 int                  identity,
   BookId               int                  not null,
   UserId               int                  not null,
   StartTime            datetime             not null default getdate(),
   EndTime              datetime             not null,
   constraint PK_BOOKLENT primary key  (BLId)
)
go


/*==============================================================*/
/* Table: BookList                                              */
/*==============================================================*/
create table BookList (
   BookId               int                  identity,
   BookName             varchar(20)          not null,
   BookDesc             varchar(200)         null,
   BookTypeId           int                  not null,
   BookStatus           D_BookFree           not null,
   BookCode             varchar(20)          null,
   constraint PK_BOOKLIST primary key  (BookId)
)
go


/*==============================================================*/
/* Table: BookType                                              */
/*==============================================================*/
create table BookType (
   BookTypeId           int                  identity,
   BookTypeName         varchar(20)          null,
   BookTypeDesc         varchar(200)         null,
   constraint PK_BOOKTYPE primary key  (BookTypeId)
)
go


/*==============================================================*/
/* Table: UserList                                              */
/*==============================================================*/
create table UserList (
   UserId               int                  identity,
   UserName             varchar(20)          not null,
   UserPassword         varchar(20)          not null,
   UserPower            P_NormalUser         not null,
   constraint PK_USERLIST primary key  (UserId)
)
go


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -