• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

changing Date available when making booking

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

my instructions state in the Database Schema section

(my highlighting)

I guess this means that in addition to updating the customer code I also have to set the Date available to the next day when making a booking...
Anyone else done this ?
Just double checking ...
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ronald,



I guess this means that in addition to updating the customer code I also have to set the Date available to the next day when making a booking...
Anyone else done this ?



I don't change the available date in my assignment (URLyBird 1.1.3). There is no guarantee that a room is available the next day/night - the hotel may be fully booked tomorrow.

In my imagination a hotel tells URLyBird to sell so many rooms for a single night. If they have 5 rooms that means 5 records in the database file. If there is just one room for today and tomorrow there are two records in the database file.

The only column that may be changed IMO is the customer id column. An empty column indicates an accomodation is available, a non-empty column means this room is booked by some customer.



cheers
martin
 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
from my assignment ONLY customer number column gets updated when you book hotel for given date..
 
Ronald Wouters
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

In my imagination a hotel tells URLyBird to sell so many rooms for a single night. If they have 5 rooms that means 5 records in the database file. If there is just one room for today and tomorrow there are two records in the database file


I hadn't tought of it that way but after thinking about it I agree with you guys. I think I will also stick with just updating the customer code.
It was that single that had me confused. Normally when a customer leaves his/her hotel room it is available again afterwards. I had forgotten that URLyBird is not an actual hotel but a broker for hotel rooms. As a broker they indeed can not assume that the room will be available the next day.
Doesn't that mean that there should be some kind of housekeeping routine that would delete booked rooms if the date available is past for more than one day ? I guess that is what that "legacy application" does they mention in my instructions ? Or should we have an automatic houskeeping when the server starts up ? Maybe there should but it is out of scope for this assignment ?
Anyway, thanks again guys.
 
Martin Sturzenhecker
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good morning Ronald,


Doesn't that mean that there should be some kind of housekeeping routine that would delete booked rooms if the date available is past for more than one day ? I guess that is what that "legacy application" does they mention in my instructions ? Or should we have an automatic houskeeping when the server starts up ? Maybe there should but it is out of scope for this assignment ?
Anyway, thanks again guys.



I will leave all housekeeping to legacy applications. The only thing is the infamous 48hrs rule, which I may implement (but I'm not yet decided on that matter).

-martin
 
Ken Boyd
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have implemented 48 hour rule. It is just date check with current and one given in db..just one method..
 
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic