holiday builder | holiday results |
Access MDB - Holiday Builder |
Contact: Richard Hall |
The object of this project is to provide an existing customer with an extended solution to a system they already have in place. Presently, they load 3 different classes of flights to the Caribbean
into an Access.MDB and there are queries for each destination and class
of flight. An asp is then used to pull the flight information and display
the results in a web page. Examples can be seen by selecting 'Caribbean
World' from the following URL and then use the drop down menu to view
flights to the Caribbean: They now require to be able to add hotels and hotel rates into the mdb which will also need to have additional tables loaded for things like room types and board basis. The creation of tables is not an issue, it is the creation of queries that are able to carry out all the calculations and permitations for each hotel, room type and board basis (all by destination) that your help is needed. I will list the logic, it is the SQL that is required in order that a holiday rate table can be displayed from a new asp rather than using static pages. Example of the static pages can be seen also on the link provided above. I have been advised that it would be better for the query to take place in the mdb and then be called by the asp rather than the asp doing the work but I am open to suggestions. This page is layed out in my logical thinking terms and is not necessarily the right method as far as programming is concerned but I feel it is enough to give you the right flavour about what we are trying to achieve. |
Project Outline | |||||||||||||||||||||||||||||||||||||||||||||
There are around 12 queires that produce results for flights to the caribbean, at this stage we are just interested in the queries based on economy flights which is currently 4. The example is based on Barbados Economy flights and everything to do with hotels at this stage can be changed as they have only been added to the mdb for the purpose of the project and are not used as part of the live system. |
|||||||||||||||||||||||||||||||||||||||||||||
Flight Query: Destination = Barbados, Class = Economy | |||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
From this table query, you can see that there are weekly flights to Barbados on certain dates for durations between 1 and 4 weeks and there is a mark-up which in this example is a negative amount that serves to give a discount on a tour operators price. |
Hotels Table: | |||||||||||||||||||||
|
|||||||||||||||||||||
The url will be used to create a hyperlink on the asp. The Htl_MUPD is not used at the moment. The Hol_MUPD (Holiday Mark Up Per Day) amount is used to calculate how much to mark up a holiday. 7 times for weekly and 14 times for 2 weeks. Tsf relates to transfers and whether they are included or not. Currency code links to the currency table to pick up the rate of exchange for the currency code. |
Hotel Accommodation Rates: The relationship to other tables are not shown. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This table shows there are rates from 02-Feb to 15-Feb in a Superior room on an All Inclusive meal plan at Barbados Hotel 1 and a Standard room on a Room Only meal plan at Barbados Hotel 2. There are also rates from 02-Feb to 08-Feb in a Standard room on a Half Board meal plan at Barbados Hotel 2. The table is shown with each hotel, room type, occupancy level, date, price and board basis as I think this is the simplest way to control the data. We could use season start and end dates but then the SQL would need to calculate how many dates in a particular season to calculate a total and this may increase the time and cost of the project. We would then need a stopsale table to note when hotels no longer have availability on a particular room type. Have a board basis supplement table per hotel would also be easier but again it would require more SQL queries to work out if there was a meal plan upgrade available. |
Holiday Cost Calculation: | |||||||||||||||||||||||||||||
This example is based on a holiday to Barbados using the data in the example tables provided. | |||||||||||||||||||||||||||||
Go to the query for Economy Class Barbados flights rates. If the field for a 1Week rate is not greater than zero then it is ignored and likewise for the 2Weeks field. If the condition applies to both then there are no 1 or 2 week economy flights to Barbados available. For any dates where the flight rate is not greater than zero, then the hotels do not need to be checked as there is no flight availablity. 7 and 14 nights have to be treated separately for this condition. |
|||||||||||||||||||||||||||||
Go to the Barbaods hotels query/table. Repeat this until flight date plus 6. If all values are greater than zero then you have the total hotel price in the contract currency. If any of the hotel rates for flight date-flight date plus 6 are not greater than zero then there is no holiday price available for 1 week on that flight date. The process needs to be repeated for 2 weeks. If there was no flight price for 7 nights then the calculation needs to start from the beggining. If there was a flight price for seven nights then the calculation process for the hotel for 1 week has already just been performed. If this failed to produce a rate then there is no point trying to calculate 2 weeks as you already no that one of the hotel dates rate is not greater than zero. If there is no TOTAL FLIGHT COST for 1 week, the process of calculation still needs to take place if there is a TOTAL FLIGHT COST for 2 weeks. A hotel can only be treated as having 6/13 consequtive nights if the hotel, room type, occupancy and board basis all match. |
|||||||||||||||||||||||||||||
For each total hotel price in the contract currency; If possible, prices to be displayed to the nearest 5 or 9 integar (no decimals). |
|||||||||||||||||||||||||||||
The system must match like for like so a hotel that has a price on day 1 for a room type on one board basis and a price the next day for the same room type but a different room type cannot be linked to create part of a holiday price.
These are examples of display results based on the data as would be loaded
from the above examples. Price calculation for 14 nights: |
Displaying The Results | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The resulting displays would be correct based on the data displayed in the above example tables and queries. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Option 1: (preferred) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There are no 2 week prices in Barbados Hotel 2 as the rates for that board basis only go to 08-Feb. There are no 2 week prices at all as there are no hotel rates past 15-Feb. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Option 2: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|