酒店管理系统数据库代码.docx

  1. 1、本文档共8页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
酒店管理系统数据库代码 酒店管理系统数据库代码 PAGE PAGE 1 / 81 / 8 酒店管理系统数据库代码 use Hotel_Management1 select *from Customer select *from Employee select *from RoomType select *from Room select *from OrderInfo select *from Checkout drop database Hotel_Management1 创 建 数 据 库 Hotel_Management create database Hotel_MDB on primary ( name=Hotel_Management1, =F:\Hotel_Management\Hotel_Management.MDF, size=10MB, =20% ) log on (name=Hotel_Management1, =F:\Hotel_Management\Hotel_Management1.LDF, size=10MB, =2MB) --使用数据库 USE Hotel_Management1 创建表 --1顾客表 create table Customer (CustomerID int primary key, CustomerName nvarchar(40) not null, CustomerInfo nvarchar(18) not null, Csex nvarchar(1), CPhone nvarchar(11)not null, Notes ntext ) --drop table Customer --2员工表 酒店管理系统数据库代码 酒店管理系统数据库代码 PAGE PAGE 2 / 82 / 8 create table Employee (EmployeeID int primary key, UserName nvarchar(40) not null, Password nvarchar(40)not null, EmployeeName nvarchar(40) not null, Esex nvarchar(1), EPhone nvarchar(11)not null, Notes ntext ) --3客房表(有外键) create table Room (RoomID int primary key, RoomTypeID int not null, RoomState nvarchar(1)not null, Notes ntext, FOREIGN KEY (RoomTypeID) REFERENCES RoomType(RoomTypeID), ) --drop table Room --4客房类型表(有外键) create table RoomType (RoomTypeID int primary key, RoomTypeName nchar(20) not null, Cost float, Total int, Surplus int, Notes ntext, ) --drop table RoomType --5订房表 select* from OrderInfo create table OrderInfo (OrderID int not null primary key, RoomID int not null , CustomerID int, EmployeeID int, Entertime datetime not null, Deposit float, ORstatic nvarchar(10)not null , Notes ntext, FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID), FOREIGN KEY (RoomID) REFERENCES Room(RoomID), 酒店管理系统数据库代码 酒店管理系统数据库代码 PAGE PAGE 3 / 83 / 8 FOREIGN KEY (EmployeeID) REFERENCES Employee(EmployeeID), ) --alter table add constraint OI_D ORstatic default use --drop table OrderInfo --6退房表check-out create table Checkout (CheckoutID int primary key, RoomID int not null, CustomerID

您可能关注的文档

文档评论(0)

199****4744 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:7002121022000045

1亿VIP精品文档

相关文档