我的任务是创建一个在线酒店预订系统。我遇到的问题是要找到可用客房的某个房间类别特定日期范围的查询。我的数据库设计涉及4个表格。数据库设计如下:查询可用客房
tbl_reservationdetails (stores the general details of the reservation)
pk resrvdtl_id (primary key)
fk client_id (insignificant for now)
start_date (customer's check-in-date)
end_date (customer's check-out-date)
tbl_reservation (stores the rooms reserved for a particular reservation)
pk reserv_id (primary key)
fk resrvdtl_id (foreign key, to know to whom and when the room should be occupied)
fk room_id (the room reserved)
tbl_room
pk room_id (primary key)
room_number
fk room_categId (to know what category this room belongs to)
tbl_roomcategory
pk room_categId (primary key)
room_category (description of category.. example: Suite, Superior, Deluxe etc. in my case... there are four categories)
用户输入是日期(开始和结束),以及他想要的房间类别。我在此很新...我怎么查询以检查类别的可用空间,在特定日期?????
这个任何回应将高度赞赏...谢谢
这看起来有点像家庭作业 - 也许先显示你的工作 - 提示你需要使用加入 – daven11 2011-05-04 10:40:04
我会添加'tbl_room.room_notes',就像*'接近电梯'*(或*'...电梯'*,如果它是在另一大西洋一侧)或*'市中心的美景*'。 – 2011-05-05 15:45:11