#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

    Help designing a hotel booking system


    Hi all,

    I am about to start making a hotel booking system in CF

    I am banging my head against the wall but cannot think what the best way is to do it.

    That bitís I am having a problem with is:
    Searching for a room from a date range.
    Marking the room unavailable for that date range.
    And last but not least whatís the best way to set up the DB.

    Thanks

    Jonathan Hemmings
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,007
    Rep Power
    2791
    Welcome to DevShed, hemmjonny.

    This sounds as though you have told someone that you can do something that you cannot.

    A hotel booking system would require electronic transfer of personal and financial details. Are you qualified to be coding something of that nature? There would be dire ramifications if the security failed.

    Perhaps I have misread your initial post. If you are unsure where to begin, the most simple method is to write a flow-chart of what happens when someone logs onto the website and begins their booking. The database design and structure should flow from that.

    I would suggest you make a start on the concept and post it here for discussion.
    [PHP] | [Perl] | [Python] | [Java] != [JavaScript] | [XML] | [ANSI C] | [C++] | [LUA] | [MySQL] | [FirebirdSQL] | [PostgreSQL] | [HTML] | [XHTML] | [CSS]

    W3Fools - A W3Schools Intervention.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0
    Originally Posted by Winters
    Welcome to DevShed, hemmjonny.

    This sounds as though you have told someone that you can do something that you cannot.

    A hotel booking system would require electronic transfer of personal and financial details. Are you qualified to be coding something of that nature? There would be dire ramifications if the security failed.

    Perhaps I have misread your initial post. If you are unsure where to begin, the most simple method is to write a flow-chart of what happens when someone logs onto the website and begins their booking. The database design and structure should flow from that.

    I would suggest you make a start on the concept and post it here for discussion.
    Thanks for the post. Your right this project it a bit bigger than what I normally do. Streamline will be handling all the personal and financial details.

    I am just struggling where to start the main bit I canít get my head round is when a room is booked how to put that date range into the DB so it will show as booked when someone else tries to book


    Thanks

    Jonathan
  6. #4
  7. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,007
    Rep Power
    2791
    Well, there are many ways to design your database for this sort of application. The most simple would be to have two fields, one start date, one end date. You would need to have tables for rooms and dates, so that rooms can be marked off as unavailable. The list goes on. As I mentioned, you should make yourself a flowchart.
    [PHP] | [Perl] | [Python] | [Java] != [JavaScript] | [XML] | [ANSI C] | [C++] | [LUA] | [MySQL] | [FirebirdSQL] | [PostgreSQL] | [HTML] | [XHTML] | [CSS]

    W3Fools - A W3Schools Intervention.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0
    Originally Posted by Winters
    Well, there are many ways to design your database for this sort of application. The most simple would be to have two fields, one start date, one end date. You would need to have tables for rooms and dates, so that rooms can be marked off as unavailable. The list goes on. As I mentioned, you should make yourself a flowchart.
    Yeah will do that today. I think i am just having a bad day.

    Thanks mate
  10. #6
  11. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,007
    Rep Power
    2791
    Post back when you need help.
    [PHP] | [Perl] | [Python] | [Java] != [JavaScript] | [XML] | [ANSI C] | [C++] | [LUA] | [MySQL] | [FirebirdSQL] | [PostgreSQL] | [HTML] | [XHTML] | [CSS]

    W3Fools - A W3Schools Intervention.
  12. #7
  13. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,263
    Rep Power
    968
    Searching for a room in a date range is simple SQL. Any book or tutorial on SQL will include sections on matching records using criteria.

    To mark it as unavailable, one option is a simple bit column in the table that flags the room as unavailable. But since I'm not sure what the business rules are for when a room is or is not available, I can't really recommend a specific approach.


    Originally Posted by hemmjonny
    Hi all,

    I am about to start making a hotel booking system in CF

    I am banging my head against the wall but cannot think what the best way is to do it.

    That bitís I am having a problem with is:
    Searching for a room from a date range.
    Marking the room unavailable for that date range.
    And last but not least whatís the best way to set up the DB.

    Thanks

    Jonathan Hemmings

IMN logo majestic logo threadwatch logo seochat tools logo