How do I Request hotels when using Geography Data?

Here we will show you how to create a Request using the Geography Data Bases

Relational Database diagram

Unknown.jpeg
 

Test Scenario:
The Client searches for a destination, let’s say Disney and they get several different options displayed from the relational files right?
(Cities, Landmarks, Hotels… etc etc) all related to a RegionID
Unknown-1.jpeg
 
After selection a proper selection (i.e. Disneyland – Anaheim…) this item has a RegionID which links into the ParentRegionList and this with the RegionEANHotelIDMapping, which links to the ActiveProperyList, that at the end gives us a list of all the Properties available for that RegionID in the RegionEANHotelIDMapping.

Unknown.png


This selection queried on the Data Files you will end up with a RegionEANHotelIDMapping filled with active properties for the selection in the EANHotelID field, this list is the one that we will send in our request.

Unknown-1.png

In example, pretending that the EANHotelID we got were 0000, 0001, 0002 and 0005 the request will be like this:
 
For XML
<hotelidList>0000,0001,0002,0005</ hotelidList >
 
 
Now, for an additional Example, if we need to identify the City of a point of interest we need to run the following query on the DB.
Example:
- Looking for the city “Paris” according to the Landmark “Eiffel Tower”

Unknown-2.png
 
SELECT ActivePropertyList.City
FROM PointsOfInterestCoordinatesList, ParentRegionList, ActivePropertyList
WHERE  PointsOfInterestCoordinatesList.RegionName = 'Eiffel Tower'
AND PointsOfInterestCoordinatesList.RegionID = ParentRegionList.RegionID
AND ParentRegionList.ParentRegionID = ActivePropertyList.RegionID
GROUP BY ActivePropertyList.City
 
This can also be used to find hotels when using an IATA code for an Airport.
 
Unknown-4.png

By creating a Query for the AirportID (IATA Code) we can do the relation between MainCiyID = RegionID and get the HotelIDs and information from ActiveProperyList.

Unknown-3.png

Now, to fully set up you need to go to:

http://developer.ean.com/database_catalogs/relational/Geography_Data and review the process
and download the files

If different language is necessary please review the xx_XX addition to the download links.
 
Now to autocomplete the text box, you can use jQuery or any tool that lets you query the data files.

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments