会议室预定系统数据库文件BookRoom

本文介绍了一个会议室预定系统的数据库设计,包括员工、会议室和预定三个表的详细结构及约束条件,并提供了测试数据。

/*

本SQL脚本是本人毕业设计“会议室预定系统”的数据库文件,名为BookRoom.sql

DBMS:MySQL

*/

 

 

 

/*==============================================================*/

/* DBMS name:      MySQL 5.0                                    */

/* Created bookRoomon:     2009/03/15 19:55:29                          */

/*==============================================================*/

 

/*==============================================================*/

/* Database: BookRoom                                         */

/*==============================================================*/

create database if not exists BookRoom;

 

Use BookRoom;

 

drop table if exists tblEmployee;

 

drop table if exists tblRoom;

 

drop table if exists tblReserve;

 

 

/*==============================================================*/

/* Table: tblEmployee                                           */

/*==============================================================*/

create table if not exists tblEmployee

(

   empId           int not null AUTO_INCREMENT comment 'primary key can not have a default value',

   empCardNo         varchar(20) default '' comment 'Employee ID can be leaded by 0,  so we set it''s type varchar.',

   empName           varchar(100) default '',

   empSex            varchar(20) default '',

   empWorkDateBegin  date default NULL comment 'YYYY-MM-DD',

   empTel            varchar(100) default '' comment 'It can either be a mobile telephone number or a office telephone number or both.',

   empEMail          varchar(100) not null unique default '' comment 'this empty string equals the dbms own default value',

   empPwd            varchar(100) not null default '',

   empRole varchar(50) not null default '',

   constraint empId primary key (empId)

)engine=InnoDB, charset=utf8, comment='Every person including the boss in the company is defined as employee';

 

/*

create index idxEmpId on tblemployee(empId);

create index idxEmpEMail on tblemployee(empEMail);

*/

 

/*==============================================================*/

/* Table: tblRoom                                             */

/*==============================================================*/

create table if not exists tblRoom

(

   roomId            int not null AUTO_INCREMENT comment 'Generated by the database automatically.',

   roomBuilding        varchar(100) not null default '' comment 'When you reserve a meeting room, you may firstly choose a building. 

            And then choose one meeting room in the building.

            Of course all the buildings and meeting rooms are listed for you.',

   roomNo              varchar(50) default '' comment 'Meeting rooms belong to every building are listed out for choosing.',

   roomName            varchar(100) not null default '',

   roomAddr            varchar(300) default '',

   constraint roomId primary key (roomId)

)engine=InnoDB, charset=utf8, comment='There are meeting rooms, which names may be the same(eg:"The First Meeting Room';

 

/*create index idxRoomId on tblRoom(roomId);*/

 

/*==============================================================*/

/* Table: tblReserve                                        */

/*==============================================================*/

create table if not exists tblReserve

(

   rsrvId          int not null AUTO_INCREMENT comment 'Generated by the database automatically.',

   empId           int not null default 0 comment 'the default value of foreign key is better',

   roomId          int not null default 0,

   rsrvDateBegin     date not null comment 'if it is not null, its default value should be null',

   rsrvDateEnd       date not null,

   rsrvTimeBegin     time not null,

   rsrvTimeEnd       time not null,   

   rsrvMtTitle       varchar(100) default '',

   rsrvDateTime      datetime default NULL,

   constraint rsrvId primary key (rsrvId),

   constraint empId foreign key (empId) REFERENCES tblEmployee(empId) on delete cascade on update cascade,

   constraint roomId foreign key (roomId) REFERENCES tblRoom(roomId) on delete cascade on update cascade

)engine=InnoDB, charset=utf8;

 

/*

create index idxRsrvId on tblReserve(rsrvId);

create index idxEmpId on tblReserve(empId);

create index idxRoomId on tblReserve(roomId);

*/

 

/*向员工表tblEmployee插入测试数据*/

insert into tblEmployee(empCardNo, empName, empSex, empWorkDateBegin, 

empTel, empEMail, empPwd, empRole)

values('S200707M00001', 'admin', 'female', '2000-01-01', 

'024001', 'admin@neusoft.com', '21232f297a57a5a743894a0e4a801fc3', 'admin');

insert into tblEmployee(empCardNo, empName, empSex, empWorkDateBegin, 

empTel, empEMail, empPwd, empRole)

values('S200707M01395', 'xielj', 'male', '2009-07-01', 

'13073548356', 'xielj@neusoft.com', 'eb530b803b2c31fea96cda98a8eb377d', 'user');

insert into tblEmployee(empCardNo, empName, empSex, empWorkDateBegin, 

empTel, empEMail, empPwd, empRole)

values('S200707M00002', 'linice', 'male', '2009-07-01', 

'13080719544', 'linice@neusoft.com', '4937ab52f35373e3391d5b98a4817258', 'user');

 

insert into tblEmployee(empCardNo, empName, empSex, empWorkDateBegin, 

empTel, empEMail, empPwd, empRole)

values('S200707M01395', 'neusoft', 'female', '2000-07-01', 

'024002', 'neusoft@neusoft.com', 'f7377865580a02f9a89533b31e4ca7b7', 'user');

 

 

/*向会议室表tblRoom插入测试数据*/

insert into tblRoom(roomBuilding, roomNo, roomName, roomAddr)

values('conference center', '101', 'linux', 'conference center');

 

insert into tblRoom(roomBuilding, roomNo, roomName, roomAddr)

values('conference center', '102', 'C#', 'conference center');

 

insert into tblRoom(roomBuilding, roomNo, roomName, roomAddr)

values('conference center', '201', 'sql', 'conference center');

 

insert into tblRoom(roomBuilding, roomNo, roomName, roomAddr)

values('A1', '101', 'java', 'A1');

 

insert into tblRoom(roomBuilding, roomNo, roomName, roomAddr)

values('A1', '102', 'C', 'A1');

 

insert into tblRoom(roomBuilding, roomNo, roomName, roomAddr)

values('A1', '103', 'C++', 'A1');

 

 

/*向预定表 tblReserve 插入测试数据*/

insert into tblReserve(empId, roomId, rsrvDateBegin, rsrvDateEnd, 

rsrvTimeBegin, rsrvTimeEnd, rsrvMtTitle, rsrvDateTime)

values(2, 4, '2009-5-2', '2009-5-2', '6:00', '8:00', 'why to learn java275', '2009-4-30 9:00');

 

insert into tblReserve(empId, roomId, rsrvDateBegin, rsrvDateEnd, 

rsrvTimeBegin, rsrvTimeEnd, rsrvMtTitle, rsrvDateTime)

values(2, 4, '2009-5-2', '2009-5-2', '13:00', '15:00', 'how to learn java275', '2009-4-30 15:45');

 

insert into tblReserve(empId, roomId, rsrvDateBegin, rsrvDateEnd, 

rsrvTimeBegin, rsrvTimeEnd, rsrvMtTitle, rsrvDateTime)

values(2, 4, '2009-5-2', '2009-5-2', '9:00', '11:00', 'learn java314', '2009-5-2 17:1');

bookmtroom

insert into tblReserve(empId, roomId, rsrvDateBegin, rsrvDateEnd, 

rsrvTimeBegin, rsrvTimeEnd, rsrvMtTitle, rsrvDateTime)

values(2, 4, '2009-5-2', '2009-5-2', '15:00', '17:00', 'why to learn japanese', '2009-5-7 8:30');

 

insert into tblReserve(empId, roomId, rsrvDateBegin, rsrvDateEnd, 

rsrvTimeBegin, rsrvTimeEnd, rsrvMtTitle, rsrvDateTime)

values(2, 4, '2009-5-2', '2009-5-2', '4:00', '6:00', 'learn japanese', '2009-5-7 8:30');

 

insert into tblReserve(empId, roomId, rsrvDateBegin, rsrvDateEnd, 

rsrvTimeBegin, rsrvTimeEnd, rsrvMtTitle, rsrvDateTime)

values(2, 4, '2009-5-2', '2009-5-2', '9:00', '14:00', 'learn japanese', '2009-5-7 8:30');

 

insert into tblReserve(empId, roomId, rsrvDateBegin, rsrvDateEnd, 

rsrvTimeBegin, rsrvTimeEnd, rsrvMtTitle, rsrvDateTime)

values(2, 4, '2009-5-2', '2009-5-2', '7:00', '13:00', 'learn japanese', '2009-5-7 8:30');

 

insert into tblReserve(empId, roomId, rsrvDateBegin, rsrvDateEnd, 

rsrvTimeBegin, rsrvTimeEnd, rsrvMtTitle, rsrvDateTime)

values(2, 4, '2009-5-2', '2009-5-2', '7:00', '14:00', 'learn japanese', '2009-5-7 8:30');

 

 

 

 

预约系统(⼀)数据库设计 预约系统(⼀)数据库设计 数据库sql server 2008 名称:DB_Date_Plan 表:T_bm,T_hys_plan,T_kryy_plan,T_meetingroom,T_room,T_time,T_userInfo 1 USE [DB_Date_Plan] 2 GO 3 /****** Object: Table [dbo].[T_userInfo] Script Date: 07/13/2017 08:38:16 ******/ 4 SET ANSI_NULLS ON 5 GO 6 SET QUOTED_IDENTIFIER ON 7 GO 8 CREATE TABLE [dbo].[T_userInfo]( 9 [id] [int] IDENTITY(1,1) NOT NULL, 10 [userName] [nvarchar](50) NULL, 11 [userPassword] [nvarchar](50) NULL, 12 [userEmail] [nvarchar](50) NULL, 13 [user_BM] [nvarchar](50) NULL, 14 [add_time] [datetime] NULL, 15 [user_FullName] [nvarchar](50) NULL, 16 [user_Power] [nvarchar](50) NULL, 17 CONSTRAINT [PK_T_userInfo] PRIMARY KEY CLUSTERED 18 ( 19 [id] ASC 20 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 21 ) ON [PRIMARY] 22 GO 23 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'⽤户权限,1-⽤户权限,2-管理员权限,3-超级权限' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_userInfo 24 GO 25 /****** Object: Table [dbo].[T_room] Script Date: 07/13/2017 08:38:16 ******/ 26 SET ANSI_NULLS ON 27 GO 28 SET QUOTED_IDENTIFIER ON 29 GO 30 CREATE TABLE [dbo].[T_room]( 31 [id] [bigint] IDENTITY(1,1) NOT NULL, 32 [room_id] [nvarchar](50) NULL, 33 [room_mc] [nvarchar](50) NULL, 34 [adder] [nvarchar](50) NULL, 35 [add_time] [datetime] NULL, 36 CONSTRAINT [PK_T_room] PRIMARY KEY CLUSTERED 37 ( 38 [id] ASC 39 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 40 ) ON [PRIMARY] 41 GO 42 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会议室编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_room', @level2type=N'COLUMN',@level2name 43 GO 44 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会议室名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_room', @level2type=N'CO
    《SSM会议室预约系统》该项目主要解决了会议室预约日常工作中的一些问题,采用技术的技术是jsp +springmvc+spring+mybatis +css+js等。 项目含有源码、文档、配套开发软件、软件安装教程、项目发布教程等。    会议室御园管理系统灵活结合多种端 口,实现您随时随地掌握会议室情况,智能化的操作手段,使您 轻松快捷的选择适合您的会议室,一键完成会议预定。    1、学会各类开发软件安装、项目导入以及项目发布,含项目源码,需求文档,配套软件等    2、该项目主要功能完善,主要用于简历项目经验丰富,以及毕业设计或者二次开发    3、提供项目源码,设计文档、数据库sql文件以及所有配套软件,按照教程即可轻松实现项目安装部署 下面是系统运行起来后的部分截图:项目实战课程:代码视频讲解版如下java项目实战之电商系统全套(前台和后台)(java毕业设计ssm框架项目)https://edu.csdn.net/course/detail/25771java项目之oa办公管理系统(java毕业设计)https://edu.csdn.net/course/detail/23008java项目之hrm人事管理项目(java毕业设计)https://edu.csdn.net/course/detail/23007JavaWeb项目实战之点餐系统前台https://edu.csdn.net/course/detail/20543JavaWeb项目实战之点餐系统后台https://edu.csdn.net/course/detail/19572JavaWeb项目实战之宿舍管理系统https://edu.csdn.net/course/detail/26721JavaWeb项目实战之点餐系统全套(前台和后台)https://edu.csdn.net/course/detail/20610java项目实战之电子商城后台(java毕业设计SSM框架项目)https://edu.csdn.net/course/detail/25770java美妆商城项目|在线购书系统(java毕业设计项目ssm版)https://edu.csdn.net/course/detail/23989系统学习课程:JavaSE基础全套视频(环境搭建 面向对象 正则表达式 IO流 多线程 网络编程 java10https://edu.csdn.net/course/detail/26941Java Web从入门到电商项目实战挑战万元高薪(javaweb教程)https://edu.csdn.net/course/detail/25976其他素材版(毕业设计或课程设计)项目:点击老师头像进行相关课程学习
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值