1. Create Cosmos DB database with Graph API
  2. Open CosmosDB-Graph-Generator and add data to your database according to instruction.
  3. Your database contains information about 46 airports. Please:
    1. list all airports in database
    2. select your favourite one and show:
      1. all details about this airport
      2. information about on which continent this airport is located
      3. how many outbound connections are available from that airport
      4. please list airport to which we can fly from this airport
      5. provide information on how many runways has this airport
      6. and also the length of the longest runway
    3. choose the second airport and check:
      1. how you can fly from your favourite airport to second one – only direct fly
      2. what is the distance between those two airports
      3. please provide five alternative routes between those two airports

Presented queries

Present all data
Present only continents
Count all continents in database
The list of sorted continents

g.V().hasLabel('continent').order().by('Name', decr)
Return all the properties and values the Wroclaw airport has
Return selected fields from a value map
g.V().has('City','Wroclaw').valueMap().select('Code', 'ICAO', 'Description')
List of airports in the USA
g.V().has('Name', 'United States').out('contains')
List of airports in the USA – projection
g.V().has('Name', 'United States').out('contains').values('City')
List of airports in the USA that have more than five runways
g.V().has('Name', 'United States').out('contains').has('NumberOfRunways',gt(5))
Total number runways of all airports
List of outbound flights from Atlanta
g.V().has('City', 'Atlanta').outE('route')

g.V().has('airport', 'City', 'Atlanta').out('route').values('Code').fold()
Number of routes available from Wrocław
Is there direct flight between Warsaw and London
g.V().has('City','Warsaw').out('route').has('City', 'London')
Distance between Warsaw and London
Flights from London Heathrow (LHR) to airports in the USA
Routes between BNA (Nashville) and IAH (Houston)
Flights from Wrocław to countries outside (without) the Poland and UK