Hotels can be found on the basis of which airport are they connected to, as shown in the following query:
neo4j-sh (?)$ MATCH (airport:Airport)-[:HAS_HOTEL]->(hotel:Hotel) WHERE airport.code IN ["JFK", "LAX"] RETURN airport.code, hotel.name, hotel.price;
The output of the preceding query is as follows:
+-----------------------------------------------------+ | airport.code | hotel.name | hotel.price | +-----------------------------------------------------+ | "JFK" | "Hampton Inn" | 70 | | "JFK" | "Fairfield Inn" | 80 | | "LAX" | "LAX South Travelodge" | 93 | | "LAX" | "Sheraton" | 170 | | "LAX" | "Concourse" | 100 | +-----------------------------------------------------+ 5 rows
Although we can find hotels while searching for flights, it is not necessary. Once the flights have been selected, this is an additional step that gives the travelers some...