473,785 Members | 2,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

prohibit double booking in room hire database

Hi

I have a database which logs the usage of rooms. Some booking are entered
well in advance, and some have stays of more than six months.

I would like to ensure that rooms which have been booked cannot be booked
again, i.e. cannot be booked in that date range

Any help will be much appreciated

Grant
Nov 12 '05 #1
4 2445
rkc

"Grant" <ja*********@ho tmail.com> wrote in message
news:c0******** **@dulnain.stir .ac.uk...
Hi

I have a database which logs the usage of rooms. Some booking are entered
well in advance, and some have stays of more than six months.

I would like to ensure that rooms which have been booked cannot be booked
again, i.e. cannot be booked in that date range


Take a look at this post

http://groups.google.com/groups?selm...%40news2.calga
ry.shaw.ca&rnum =7

If that doesn't do it for you, search this newsgroup on Google for posts
by that articles author using reservations as a key word.

Nov 12 '05 #2
"rkc" <rk*@yabba.dabb a.do.rochester. rr.bomb> wrote in message
news:ba******** ***********@twi ster.nyroc.rr.c om...

"Grant" <ja*********@ho tmail.com> wrote in message
news:c0******** **@dulnain.stir .ac.uk...
Hi

I have a database which logs the usage of rooms. Some booking are entered well in advance, and some have stays of more than six months.

I would like to ensure that rooms which have been booked cannot be booked again, i.e. cannot be booked in that date range
Take a look at this post

http://groups.google.com/groups?selm...%40news2.calga ry.shaw.ca&rnum =7


Isn't that a beautifully simple solution? Exactly the sort of thing that
reminds me I'll never make it as a mathematician. I'm the one that would
have ended up with a
If ...then
If...then
If then

nested to umpteen levels.
Nov 12 '05 #3
Mike, et al.
Available rooms is an outer join between booking dates and rooms. You need
a rooms table, a booking dates table and an intersection entity that lists
booked dates/rooms. Then it's an easy bit of SQL looking for dates in
booked dates/rooms by room where date is null for the requested dates.
Similar SQL can present to the requester the available dates/rooms.
I did a sample db some time ago which demonstrated this and could do it
again if there is interest. It'd be a fun weekend project.
"Mike MacSween" <mi************ ***********@bti nternet.com> wrote in message
news:40******** **************@ news.aaisp.net. uk...
"rkc" <rk*@yabba.dabb a.do.rochester. rr.bomb> wrote in message
news:ba******** ***********@twi ster.nyroc.rr.c om...

"Grant" <ja*********@ho tmail.com> wrote in message
news:c0******** **@dulnain.stir .ac.uk...
Hi

I have a database which logs the usage of rooms. Some booking are entered well in advance, and some have stays of more than six months.

I would like to ensure that rooms which have been booked cannot be booked again, i.e. cannot be booked in that date range


Take a look at this post

http://groups.google.com/groups?selm...%40news2.calga
ry.shaw.ca&rnum =7


Isn't that a beautifully simple solution? Exactly the sort of thing that
reminds me I'll never make it as a mathematician. I'm the one that would
have ended up with a
If ...then
If...then
If then

nested to umpteen levels.

Nov 12 '05 #4
Thanks Mike and Alan

Hope the interest is there for your 'weekend project' Alan

Grant
"Alan Webb" <kn*****@hotmai l.com> wrote in message
news:7q******** ********@news.u swest.net...
Mike, et al.
Available rooms is an outer join between booking dates and rooms. You need a rooms table, a booking dates table and an intersection entity that lists
booked dates/rooms. Then it's an easy bit of SQL looking for dates in
booked dates/rooms by room where date is null for the requested dates.
Similar SQL can present to the requester the available dates/rooms.
I did a sample db some time ago which demonstrated this and could do it
again if there is interest. It'd be a fun weekend project.
"Mike MacSween" <mi************ ***********@bti nternet.com> wrote in message news:40******** **************@ news.aaisp.net. uk...
"rkc" <rk*@yabba.dabb a.do.rochester. rr.bomb> wrote in message
news:ba******** ***********@twi ster.nyroc.rr.c om...

"Grant" <ja*********@ho tmail.com> wrote in message
news:c0******** **@dulnain.stir .ac.uk...
> Hi
>
> I have a database which logs the usage of rooms. Some booking are

entered
> well in advance, and some have stays of more than six months.
>
> I would like to ensure that rooms which have been booked cannot be

booked
> again, i.e. cannot be booked in that date range

Take a look at this post

http://groups.google.com/groups?selm...%40news2.calga
ry.shaw.ca&rnum =7


Isn't that a beautifully simple solution? Exactly the sort of thing that
reminds me I'll never make it as a mathematician. I'm the one that would
have ended up with a
If ...then
If...then
If then

nested to umpteen levels.


Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
18693
by: Dave Robinson | last post by:
I was wondering if anyone could help me with a problem I'm having. I've been using Dreamweaver to create a hotel booking system for a friend of mine, using MySQL (version 4.0.21) and PHP 5. The bit I'm struggling with is checking the Room Availability based on dates that are typed into a textfield and then returning a list of the available rooms on the next page. The three tables involved in this function are: CREATE TABLE `room` (
4
3254
by: WiseOwl | last post by:
Hi folks I teach. At school, four IT rooms are booked using a paper based outline timetable. Completing it is easy but basic and impossible to ensure completion of all fields (name, year group, subject and software) and analysis of bookings is a nightmare. I just fancied pottering with Access, which I am pretty familiar with, to see if I could create a means of booking a room using a database. Locking a booking would then be a...
2
8240
by: Andy | last post by:
Hi folks I teach. At school, four IT rooms are booked using a paper based outline timetable. Completing it is easy but basic and impossible to ensure completion of all fields (name, year group, subject and software) and analysis of bookings is a nightmare. I just fancied pottering with Access, which I am pretty familiar with, to see if I could create a means of booking a room using a database. Locking a booking would then be a...
4
2771
by: markymark34 | last post by:
Im messing around trying to learn Access and have hit a problem. I have a table called tblbookings and i want to seach though it when trying to make a new booking to make sure the room isnt alrady booked. In tblbookings i have a room_number, booking_start_date and booking_end_date Ive tried all sorts of code but it either brings up an error or doesnt do anything at all. Hoping someone can help. Ive got as far as bringing up a...
1
3217
by: simba | last post by:
Hello, I am currently doing a project which requires me to develop an online booking system for hotels and integrate both bed and room booking. I have the room booking working but I cant seem to get the bed booking working. I have dorm rooms with 8 beds in them and I would like to have a query(or something) which allows me to make the dorm rooms bed booked instead of room booked. Anyone any ideas on how to make this happen, anything would be...
5
5260
by: ugcs93 | last post by:
I'm a self taught beginner and, with a lot of luck, I've managed to build a db to schedule classes, rooms, and students. But I'm stuck on ensuring students aren't double booked. I assigned a code to all my available time slots, so I can't double book the room, and I have a sub form on my Classes form so that I can see the Instructors schedule. I also have it that a student can't be scheduled for the same class twice. But my mushy brain can't...
6
2556
by: iazahoor | last post by:
I use Access 2000 and I'm trying to figure out what VBA code to use to prevent double bookings. Any help on this matter will be greatly appreciated. Regards Immy
5
2817
by: Peter Sutton | last post by:
Greetings all, My booking system includes 2 tables: tblRooms with the key field RoomID, and some other fields AND a tblBooked Rooms with a number of fields including RoomID and BookedDate. For a given date range, I can generate a vacant room report by generating a temporary table of all the Rooms and BookedDates using a cartesian join, and then either deleting the booked rooms, or by
3
3070
by: 88stevie | last post by:
Hi all, I have a system and I'm a little stuck. It's a booking system. It has rooms, etc and every room have a daily price. Then it has special daily rates when assigned. How do I calculate the total cost of a room if a daily rate exists?
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.