Here we will show you how to create a Request using the Geography Data Bases
Relational Database diagram
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
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.
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.
In example, pretending that the EANHotelID we got were 0000, 0001, 0002 and 0005 the request will be like this:
<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.
- Looking for the city “Paris” according to the Landmark “Eiffel Tower”
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.
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.
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.