01.酒店管理系统
来源:互联网 发布:如何查看数据库字符集 编辑:程序博客网 时间:2024/05/16 19:55
/*==============================================================*//* DBMS name: Microsoft SQL Server 2005 *//* Created on: 2017/1/2 16:06:52 *//*==============================================================*/if exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('GuestRecord') and o.name = 'FK_GUESTREC_REFERENCE_ROOM')alter table GuestRecord drop constraint FK_GUESTREC_REFERENCE_ROOMgoif exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('Room') and o.name = 'FK_ROOM_REFERENCE_ROOMSTAT')alter table Room drop constraint FK_ROOM_REFERENCE_ROOMSTATgoif exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('Room') and o.name = 'FK_ROOM_REFERENCE_ROOMTYPE')alter table Room drop constraint FK_ROOM_REFERENCE_ROOMTYPEgoif exists (select 1 from sysobjects where id = object_id('GuestRecord') and type = 'U') drop table GuestRecordgoif exists (select 1 from sysobjects where id = object_id('Room') and type = 'U') drop table Roomgoif exists (select 1 from sysobjects where id = object_id('RoomState') and type = 'U') drop table RoomStategoif exists (select 1 from sysobjects where id = object_id('RoomType') and type = 'U') drop table RoomTypego/*==============================================================*//* Table: GuestRecord *//*==============================================================*/create table GuestRecord ( GuestID int not null, RoomID int null, GuestName nvarchar(32) not null, IdentityID varchar(36) null, ResideDate datetime null, LeaveDate datetime null, Deposit money null, TotaMoney money null, constraint PK_GUESTRECORD primary key (GuestID))go/*==============================================================*//* Table: Room *//*==============================================================*/create table Room ( RoomID int not null, RoomStateID int null, TypeID int null, Description varchar(100) null, GuestNum int null, RoomState varchar(2) null, RoomType varchar(4) null, constraint PK_ROOM primary key (RoomID))go/*==============================================================*//* Table: RoomState *//*==============================================================*/create table RoomState ( RoomStateID int not null, RoomStateName varchar(32) not null, constraint PK_ROOMSTATE primary key (RoomStateID))go/*==============================================================*//* Table: RoomType *//*==============================================================*/create table RoomType ( TypeID int not null, TypeName varchar(32) not null, BedNum int not null, Price money not null, constraint PK_ROOMTYPE primary key (TypeID))goalter table GuestRecord add constraint FK_GUESTREC_REFERENCE_ROOM foreign key (RoomID) references Room (RoomID)goalter table Room add constraint FK_ROOM_REFERENCE_ROOMSTAT foreign key (RoomStateID) references RoomState (RoomStateID)goalter table Room add constraint FK_ROOM_REFERENCE_ROOMTYPE foreign key (TypeID) references RoomType (TypeID)go
0 0
- 01.酒店管理系统
- 酒店管理系统
- 酒店管理系统
- 酒店管理系统心得
- 酒店管理系统数据库
- 酒店管理系统
- 酒店管理系统
- php酒店管理系统
- 酒店管理系统
- 简易酒店管理系统
- 酒店管理系统(C#)
- 酒店管理系统
- 酒店管理系统程序
- 酒店管理系统程序
- 指针.酒店管理系统
- 指针.酒店管理系统
- 酒店管理系统
- 酒店管理系统
- 同时使用python2与python3的简单方法
- (翻译)Draft.js编辑器简介
- CodeForces 750E. New Year and Old Subsequence
- bzoj 2127
- 求思路:递归查询后,数据根据父节点分组统计!!!
- 01.酒店管理系统
- Android新手,求助Banner广告条的开发办法
- jquery实现获取多个复选框选中值,并拼接为字符串
- phonegap跨域的问题
- ios百度地图基础地图实现
- 帮忙:安卓程序按钮布局
- sql查询相同数据日期最大的那条数据小于某个值
- Android模拟器横竖屏不能切换,太奇怪了!!!
- 安卓timer.cancel();问题!!