• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

The solution of usage efficiency of room, please talk about it.

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My assignment is URLyBird.

In instruction there is a statment "They take bookings only within 48 hours of the start of room occupancy",
which mean that customer can book the room that will be occupy on today, tomorrow or the day after tomorrow.

Well, assume here is a room that have been booked and occupied tomorrow by a customer, so in database, here should have a
record that the Date field value is tomorrow.

To the date after tomorrow, How should I manage it? let it idle?
I have tree solution as below,

1. Let it idle, using this solution, the use efficiency of the room is somewhat low, but the customer can modify the booking infomation,
e.g. modify occupying date or cancel the booking.
2. allow it to be occupy by other customer, using this solution, the infomation related to the room, which record the first customer's id and occupied time in database, will be wiped off, but the new customer's information instead. it mean that CSR can't find the record associated with the first customer again, as a result the first customer can't modify the booking.
3. append the same two record as the record is associated with the room, which represent today, tomorrow and the day after tomorrow respectively, therefore, customer can modify the booking infomation and the room can be used efficiently. but the instruction have a sentence
as below
"the data must continue to be manipulated for reports using another custom-written application, the new system must reimplement the database code from scratch without altering the data file format. "
I don't konw if this solution deviate the instruction.

please give me a idea to decide to adopt which one.

best regard
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Along,

My understanding of the requirements is that each entry in the database only relates to a specific date. e.g. for date 25/07/2004 you only need to worry about that date. In order to be able to book the following day (assuming that is within 48 hrs), a seperate entry would be needed (i.e. another row in the JTable with date 26/07/2004).

Hope this helps,

Jon
 
Along huang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,Jon

I don't understand your meaning well.

In JTable, two rows, which is set date is 25/07/2004 and 26/07/2004 respectively, relate to the same room? or one row individually represent a room?

best regard
 
Ranch Hand
Posts: 531
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you can only book a room within 48 hours of its availability, then a room listed in the database but outside the next 48 hours is not bookable.

Generally speaking, they probably would not be getting listings from hotels before the room was 48 hours from availability. It seems like a valid assumption. However, should a room be put into the system with further availability, it should just be skipped because it is not bookable.

For the purposes of simplicity, I would assume a time zone and stick to it for every room and customer, even though it is not realisitic - otherwise, you will find yourself writing unnecessarily complex code.
[ July 25, 2004: Message edited by: Anton Golovin ]
 
Jon Entwistle
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Along,


In JTable, two rows, which is set date is 25/07/2004 and 26/07/2004 respectively, relate to the same room? or one row individually represent a room?



I would look at it as each row in the table represents a 'vacancy' on a particular date at a particular hotel/hostel rather than a particular room (the data we are given does not distinguish between rooms).

So two rows at the same hotel for dates 25/07/2004 and 26/07/2004 just says that there is a vacancy at the given hotel on these two dates (this could be the same room or different rooms).

Does this clear it up for you?

Regards,

Jon
 
Along huang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much!

Jon,
As what you said, every room(or regarded as hotel) should requst to append another record which is the same as the original except for date field and owner field. It is a good idea and similar my third solution.

But, in instruction, the statement "the data must continue to be manipulated for reports using another custom-written application" puzzle me,
I am not sure if so deviate it.

I have written the codes over, I apply the first solution, as it is simple, as Anton said.

best regard.
 
Sunglasses. AKA Coolness prosthetic. This tiny ad doesn't need shades:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic