[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Reservation system for resources for 365days?

Posted on 2004-11-16
9
Medium Priority
?
193 Views
Last Modified: 2010-07-27
How to design a reservation system for resources that user can book any time & day they select?

Currently, my application design only do booking for today. As:

I am using a JTable to populate a list of resources with details for user to view. It also indicate the block of time that other user had booked. I joined the workstation table, pc table, peripheral table, and timeslot table. When a user booking is successful it will insert the name of the user to the block of time booked in this timeslot table.

I do have a Reservation table where by it stores all the reservation details such as the date, time, the workstation reserved, user id etc.

However, I can't possibly create a timeslot table for the 365days. It didn't make sense.  How is such system(reservation system) implemented for real/in the market?




0
Comment
Question by:coffee_bean
  • 4
  • 3
8 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 90 total points
ID: 12592743
Can't you just have a booking table which stores:

Start Date/Time
End Date/Time
Person ID
Description

Then you can find bookings for a particular day, as that day will have StartTime <= today and EndTime >= today
0
 
LVL 13

Assisted Solution

by:bochgoch
bochgoch earned 90 total points
ID: 12593093
I think you need a more complex solution. Use a booking table as above, supplement this with rules (which you can implement as you prefer, code or data) related to which days are bookable (eg. not weekends / public holidays), the hours that can be booked (eg. 9am to 5pm), the length of time bookable etc....

Then validate your user entry through these rules -- when valid update your table. You can also use these rules to present available timeslots, current bookings etc. to the user.

You don't need to create all those timeslots, you define the rules related to timeslots and implement through a mix of rules and data....
0
 

Author Comment

by:coffee_bean
ID: 12600591
Hi TimYates, I already had the booking table.
 
>>I do have a Reservation table where by it stores all the reservation details such as the date, time, the workstation reserved, user id etc.

Here is a screenshot of my resource reservation  if it's helps. It's still very basic at the moment.  

http://acupofcoffee.multiply.com/photos/photo/5/1.jpg

You see my table has the time block (columns) and information of the user who booked at that timeslot.
I can do so becos I had a table (timeslot) that is created to handle reservation for that day. Whenever user successfully reserve a workstation, the name +id of the user is inserted into the timeslot table.  

As said, I can't create a timeslot for 365days. So how am I suppose to create a table view of the resources, their timeslot availability and info of the user who booked on that slot??
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 35

Expert Comment

by:TimYates
ID: 12601957
I still don't get what you mean :-(

What do you mean by "I can't create a timeslot for 365days"

Sorry...  It's probably too early in the morning ;-)
0
 

Author Comment

by:coffee_bean
ID: 12606640
i meant Timeslot table inside Microsoft Access database.
This timeslot table is where I had columns of the time (eg0830,0930 ...etc)

Timeslot table is one of the tables I used it to joined it with workstation table, pc table, peripheral table. so that I can display the columns of timeslot together with other workstation details. Whenever user successfully reserve a workstation, it will insert their name and user id into this Timeslot table.

Screenshot if it helps.

http://acupofcoffee.multiply.com/photos/photo/6/1.jpg
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12612354
Yeah, what I meant was instead of creating a table with a column for every time over a year, and a row for every resource, just create a table where it has a start time, and end time, and a resource id...

You can then find timeslots for a specified time by using a "where" clause in your SQL
0
 

Author Comment

by:coffee_bean
ID: 12799317
no no this qn has not been abondon. I will close this question myself. Thanks.

0
 

Author Comment

by:coffee_bean
ID: 12827122
Tim Yates, bochgoch

Thanks for the advice. I have closed this qn.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question