ArangoDB comes with a set of easy-to-understand graphs for demonstration purposes.

  • In the web interface, navigate to the Graphs section, click Add Graph, go to the Examples tab, and click the Create button of one of the listed graphs.

  • In arangosh, run require("@arangodb/graph-examples/example-graph").loadGraph("<name>"); with <name> substituted by the name of an example graph listed below.

You can visually explore the created graphs in the Graph viewer of the web interface.

You can take a look at the script that creates the example graphs on GitHub for reference about how to manage graphs programmatically.

Knows Graph

The knows graph is a set of persons knowing each other:

Persons relation Example Graph

The graph consists of a persons node collection connected via a knows edge collection. There are five persons, Alice, Bob, Charlie, Dave, and Eve. They have the following directed relations:

  • Alice knows Bob
  • Bob knows Charlie
  • Bob knows Dave
  • Eve knows Alice
  • Eve knows Bob

Example of how to create the graph, inspect its nodes and edges, and delete it again:

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("knows_graph");
db.persons.toArray()
db.knows.toArray();
examples.dropGraph("knows_graph");
Show output
[ 
  { 
    "_key" : "alice", 
    "_id" : "persons/alice", 
    "_rev" : "_mWqkqae---", 
    "name" : "Alice" 
  }, 
  { 
    "_key" : "bob", 
    "_id" : "persons/bob", 
    "_rev" : "_mWqkqae--_", 
    "name" : "Bob" 
  }, 
  { 
    "_key" : "charlie", 
    "_id" : "persons/charlie", 
    "_rev" : "_mWqkqai---", 
    "name" : "Charlie" 
  }, 
  { 
    "_key" : "dave", 
    "_id" : "persons/dave", 
    "_rev" : "_mWqkqai--_", 
    "name" : "Dave" 
  }, 
  { 
    "_key" : "eve", 
    "_id" : "persons/eve", 
    "_rev" : "_mWqkqai--A", 
    "name" : "Eve" 
  } 
]

[ 
  { 
    "_key" : "31382", 
    "_id" : "knows/31382", 
    "_from" : "persons/alice", 
    "_to" : "persons/bob", 
    "_rev" : "_mWqkqai--B", 
    "vertex" : "alice" 
  }, 
  { 
    "_key" : "31384", 
    "_id" : "knows/31384", 
    "_from" : "persons/bob", 
    "_to" : "persons/charlie", 
    "_rev" : "_mWqkqai--C", 
    "vertex" : "bob" 
  }, 
  { 
    "_key" : "31386", 
    "_id" : "knows/31386", 
    "_from" : "persons/bob", 
    "_to" : "persons/dave", 
    "_rev" : "_mWqkqai--D", 
    "vertex" : "bob" 
  }, 
  { 
    "_key" : "31388", 
    "_id" : "knows/31388", 
    "_from" : "persons/eve", 
    "_to" : "persons/alice", 
    "_rev" : "_mWqkqam---", 
    "vertex" : "eve" 
  }, 
  { 
    "_key" : "31390", 
    "_id" : "knows/31390", 
    "_from" : "persons/eve", 
    "_to" : "persons/bob", 
    "_rev" : "_mWqkqam--_", 
    "vertex" : "eve" 
  } 
]

Note: With the default traversal depth of 2 of the graph viewer, you may not see all edges of this graph by default.

Traversal Graph

The traversalGraph has been designed to demonstrate filters in traversals. It has some labels to filter on it. The graph’s nodes are in a collection called circles, and it has an edge collection edges to connect them.

Traversal Graph

Circles have unique numeric labels. Edges have two boolean attributes (theFalse always being false, theTruth always being true) and a label sorting B - D to the left side, G - K to the right side. Left and right side split into paths - at B and G, which are each direct neighbors of the root-node A. Starting from A, the graph has a depth of 3 on all its paths.

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("traversalGraph");
db.circles.toArray();
db.edges.toArray();
examples.dropGraph("traversalGraph");
Show output
[ 
  { 
    "_key" : "A", 
    "_id" : "circles/A", 
    "_rev" : "_mWqkqbW---", 
    "label" : "1" 
  }, 
  { 
    "_key" : "B", 
    "_id" : "circles/B", 
    "_rev" : "_mWqkqbW--_", 
    "label" : "2" 
  }, 
  { 
    "_key" : "C", 
    "_id" : "circles/C", 
    "_rev" : "_mWqkqbW--A", 
    "label" : "3" 
  }, 
  { 
    "_key" : "D", 
    "_id" : "circles/D", 
    "_rev" : "_mWqkqbW--B", 
    "label" : "4" 
  }, 
  { 
    "_key" : "E", 
    "_id" : "circles/E", 
    "_rev" : "_mWqkqbW--C", 
    "label" : "5" 
  }, 
  { 
    "_key" : "F", 
    "_id" : "circles/F", 
    "_rev" : "_mWqkqba---", 
    "label" : "6" 
  }, 
  { 
    "_key" : "G", 
    "_id" : "circles/G", 
    "_rev" : "_mWqkqba--_", 
    "label" : "7" 
  }, 
  { 
    "_key" : "H", 
    "_id" : "circles/H", 
    "_rev" : "_mWqkqba--A", 
    "label" : "8" 
  }, 
  { 
    "_key" : "I", 
    "_id" : "circles/I", 
    "_rev" : "_mWqkqba--B", 
    "label" : "9" 
  }, 
  { 
    "_key" : "J", 
    "_id" : "circles/J", 
    "_rev" : "_mWqkqba--C", 
    "label" : "10" 
  }, 
  { 
    "_key" : "K", 
    "_id" : "circles/K", 
    "_rev" : "_mWqkqbe---", 
    "label" : "11" 
  } 
]

[ 
  { 
    "_key" : "31459", 
    "_id" : "edges/31459", 
    "_from" : "circles/A", 
    "_to" : "circles/B", 
    "_rev" : "_mWqkqbe--_", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_bar" 
  }, 
  { 
    "_key" : "31461", 
    "_id" : "edges/31461", 
    "_from" : "circles/B", 
    "_to" : "circles/C", 
    "_rev" : "_mWqkqbe--A", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_blarg" 
  }, 
  { 
    "_key" : "31463", 
    "_id" : "edges/31463", 
    "_from" : "circles/C", 
    "_to" : "circles/D", 
    "_rev" : "_mWqkqbe--B", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_blorg" 
  }, 
  { 
    "_key" : "31465", 
    "_id" : "edges/31465", 
    "_from" : "circles/B", 
    "_to" : "circles/E", 
    "_rev" : "_mWqkqbe--C", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_blub" 
  }, 
  { 
    "_key" : "31467", 
    "_id" : "edges/31467", 
    "_from" : "circles/E", 
    "_to" : "circles/F", 
    "_rev" : "_mWqkqbi---", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_schubi" 
  }, 
  { 
    "_key" : "31469", 
    "_id" : "edges/31469", 
    "_from" : "circles/A", 
    "_to" : "circles/G", 
    "_rev" : "_mWqkqbi--_", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_foo" 
  }, 
  { 
    "_key" : "31471", 
    "_id" : "edges/31471", 
    "_from" : "circles/G", 
    "_to" : "circles/H", 
    "_rev" : "_mWqkqbi--A", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_blob" 
  }, 
  { 
    "_key" : "31473", 
    "_id" : "edges/31473", 
    "_from" : "circles/H", 
    "_to" : "circles/I", 
    "_rev" : "_mWqkqbi--B", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_blub" 
  }, 
  { 
    "_key" : "31475", 
    "_id" : "edges/31475", 
    "_from" : "circles/G", 
    "_to" : "circles/J", 
    "_rev" : "_mWqkqbi--C", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_zip" 
  }, 
  { 
    "_key" : "31477", 
    "_id" : "edges/31477", 
    "_from" : "circles/J", 
    "_to" : "circles/K", 
    "_rev" : "_mWqkqbm---", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_zup" 
  } 
]

Note: With the default traversal depth of 2 of the graph viewer, you may not see all edges of this graph by default.

k Shortest Paths Graph

The nodes in the kShortestPathsGraph graph are train stations of cities in Europe and North America. The edges represent train connections between them, with the travel time for both directions as edge weight.

Train Connection Map

See the k Shortest Paths page for query examples.

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("kShortestPathsGraph");
db.places.toArray();
db.connections.toArray();
examples.dropGraph("kShortestPathsGraph");
Show output
[ 
  { 
    "_key" : "Inverness", 
    "_id" : "places/Inverness", 
    "_rev" : "_mWqkqdS---", 
    "label" : "Inverness" 
  }, 
  { 
    "_key" : "Aberdeen", 
    "_id" : "places/Aberdeen", 
    "_rev" : "_mWqkqdS--_", 
    "label" : "Aberdeen" 
  }, 
  { 
    "_key" : "Leuchars", 
    "_id" : "places/Leuchars", 
    "_rev" : "_mWqkqdW---", 
    "label" : "Leuchars" 
  }, 
  { 
    "_key" : "StAndrews", 
    "_id" : "places/StAndrews", 
    "_rev" : "_mWqkqdW--_", 
    "label" : "StAndrews" 
  }, 
  { 
    "_key" : "Edinburgh", 
    "_id" : "places/Edinburgh", 
    "_rev" : "_mWqkqdW--A", 
    "label" : "Edinburgh" 
  }, 
  { 
    "_key" : "Glasgow", 
    "_id" : "places/Glasgow", 
    "_rev" : "_mWqkqdW--B", 
    "label" : "Glasgow" 
  }, 
  { 
    "_key" : "York", 
    "_id" : "places/York", 
    "_rev" : "_mWqkqda---", 
    "label" : "York" 
  }, 
  { 
    "_key" : "Carlisle", 
    "_id" : "places/Carlisle", 
    "_rev" : "_mWqkqda--_", 
    "label" : "Carlisle" 
  }, 
  { 
    "_key" : "Birmingham", 
    "_id" : "places/Birmingham", 
    "_rev" : "_mWqkqda--A", 
    "label" : "Birmingham" 
  }, 
  { 
    "_key" : "London", 
    "_id" : "places/London", 
    "_rev" : "_mWqkqda--B", 
    "label" : "London" 
  }, 
  { 
    "_key" : "Brussels", 
    "_id" : "places/Brussels", 
    "_rev" : "_mWqkqde---", 
    "label" : "Brussels" 
  }, 
  { 
    "_key" : "Cologne", 
    "_id" : "places/Cologne", 
    "_rev" : "_mWqkqdi---", 
    "label" : "Cologne" 
  }, 
  { 
    "_key" : "Toronto", 
    "_id" : "places/Toronto", 
    "_rev" : "_mWqkqdi--_", 
    "label" : "Toronto" 
  }, 
  { 
    "_key" : "Winnipeg", 
    "_id" : "places/Winnipeg", 
    "_rev" : "_mWqkqdi--A", 
    "label" : "Winnipeg" 
  }, 
  { 
    "_key" : "Saskatoon", 
    "_id" : "places/Saskatoon", 
    "_rev" : "_mWqkqdi--B", 
    "label" : "Saskatoon" 
  }, 
  { 
    "_key" : "Edmonton", 
    "_id" : "places/Edmonton", 
    "_rev" : "_mWqkqdi--C", 
    "label" : "Edmonton" 
  }, 
  { 
    "_key" : "Jasper", 
    "_id" : "places/Jasper", 
    "_rev" : "_mWqkqdm---", 
    "label" : "Jasper" 
  }, 
  { 
    "_key" : "Vancouver", 
    "_id" : "places/Vancouver", 
    "_rev" : "_mWqkqdm--_", 
    "label" : "Vancouver" 
  } 
]

[ 
  { 
    "_key" : "31553", 
    "_id" : "connections/31553", 
    "_from" : "places/Inverness", 
    "_to" : "places/Aberdeen", 
    "_rev" : "_mWqkqdm--A", 
    "travelTime" : 3 
  }, 
  { 
    "_key" : "31555", 
    "_id" : "connections/31555", 
    "_from" : "places/Aberdeen", 
    "_to" : "places/Inverness", 
    "_rev" : "_mWqkqdm--B", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "31557", 
    "_id" : "connections/31557", 
    "_from" : "places/Aberdeen", 
    "_to" : "places/Leuchars", 
    "_rev" : "_mWqkqdm--C", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "31559", 
    "_id" : "connections/31559", 
    "_from" : "places/Leuchars", 
    "_to" : "places/Aberdeen", 
    "_rev" : "_mWqkqdq---", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "31561", 
    "_id" : "connections/31561", 
    "_from" : "places/Leuchars", 
    "_to" : "places/Edinburgh", 
    "_rev" : "_mWqkqdq--_", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "31563", 
    "_id" : "connections/31563", 
    "_from" : "places/Edinburgh", 
    "_to" : "places/Leuchars", 
    "_rev" : "_mWqkqdq--A", 
    "travelTime" : 3 
  }, 
  { 
    "_key" : "31565", 
    "_id" : "connections/31565", 
    "_from" : "places/Edinburgh", 
    "_to" : "places/Glasgow", 
    "_rev" : "_mWqkqdq--B", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "31567", 
    "_id" : "connections/31567", 
    "_from" : "places/Glasgow", 
    "_to" : "places/Edinburgh", 
    "_rev" : "_mWqkqdq--C", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "31569", 
    "_id" : "connections/31569", 
    "_from" : "places/Edinburgh", 
    "_to" : "places/York", 
    "_rev" : "_mWqkqdu---", 
    "travelTime" : 3.5 
  }, 
  { 
    "_key" : "31571", 
    "_id" : "connections/31571", 
    "_from" : "places/York", 
    "_to" : "places/Edinburgh", 
    "_rev" : "_mWqkqdu--_", 
    "travelTime" : 4 
  }, 
  { 
    "_key" : "31573", 
    "_id" : "connections/31573", 
    "_from" : "places/Glasgow", 
    "_to" : "places/Carlisle", 
    "_rev" : "_mWqkqdu--A", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "31575", 
    "_id" : "connections/31575", 
    "_from" : "places/Carlisle", 
    "_to" : "places/Glasgow", 
    "_rev" : "_mWqkqdu--B", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "31577", 
    "_id" : "connections/31577", 
    "_from" : "places/Carlisle", 
    "_to" : "places/York", 
    "_rev" : "_mWqkqdu--C", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "31579", 
    "_id" : "connections/31579", 
    "_from" : "places/York", 
    "_to" : "places/Carlisle", 
    "_rev" : "_mWqkqdy---", 
    "travelTime" : 3.5 
  }, 
  { 
    "_key" : "31581", 
    "_id" : "connections/31581", 
    "_from" : "places/Carlisle", 
    "_to" : "places/Birmingham", 
    "_rev" : "_mWqkqdy--_", 
    "travelTime" : 2 
  }, 
  { 
    "_key" : "31583", 
    "_id" : "connections/31583", 
    "_from" : "places/Birmingham", 
    "_to" : "places/Carlisle", 
    "_rev" : "_mWqkqdy--A", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "31585", 
    "_id" : "connections/31585", 
    "_from" : "places/Birmingham", 
    "_to" : "places/London", 
    "_rev" : "_mWqkqdy--B", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "31587", 
    "_id" : "connections/31587", 
    "_from" : "places/London", 
    "_to" : "places/Birmingham", 
    "_rev" : "_mWqkqd2---", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "31589", 
    "_id" : "connections/31589", 
    "_from" : "places/Leuchars", 
    "_to" : "places/StAndrews", 
    "_rev" : "_mWqkqd2--_", 
    "travelTime" : 0.2 
  }, 
  { 
    "_key" : "31591", 
    "_id" : "connections/31591", 
    "_from" : "places/StAndrews", 
    "_to" : "places/Leuchars", 
    "_rev" : "_mWqkqd2--A", 
    "travelTime" : 0.2 
  }, 
  { 
    "_key" : "31593", 
    "_id" : "connections/31593", 
    "_from" : "places/York", 
    "_to" : "places/London", 
    "_rev" : "_mWqkqd2--B", 
    "travelTime" : 1.8 
  }, 
  { 
    "_key" : "31595", 
    "_id" : "connections/31595", 
    "_from" : "places/London", 
    "_to" : "places/York", 
    "_rev" : "_mWqkqd2--C", 
    "travelTime" : 2 
  }, 
  { 
    "_key" : "31597", 
    "_id" : "connections/31597", 
    "_from" : "places/London", 
    "_to" : "places/Brussels", 
    "_rev" : "_mWqkqd6---", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "31599", 
    "_id" : "connections/31599", 
    "_from" : "places/Brussels", 
    "_to" : "places/London", 
    "_rev" : "_mWqkqd6--_", 
    "travelTime" : 3.5 
  }, 
  { 
    "_key" : "31601", 
    "_id" : "connections/31601", 
    "_from" : "places/Brussels", 
    "_to" : "places/Cologne", 
    "_rev" : "_mWqkqd6--A", 
    "travelTime" : 2 
  }, 
  { 
    "_key" : "31603", 
    "_id" : "connections/31603", 
    "_from" : "places/Cologne", 
    "_to" : "places/Brussels", 
    "_rev" : "_mWqkqd6--B", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "31605", 
    "_id" : "connections/31605", 
    "_from" : "places/Toronto", 
    "_to" : "places/Winnipeg", 
    "_rev" : "_mWqkqd6--C", 
    "travelTime" : 36 
  }, 
  { 
    "_key" : "31607", 
    "_id" : "connections/31607", 
    "_from" : "places/Winnipeg", 
    "_to" : "places/Toronto", 
    "_rev" : "_mWqkqe----", 
    "travelTime" : 35 
  }, 
  { 
    "_key" : "31609", 
    "_id" : "connections/31609", 
    "_from" : "places/Winnipeg", 
    "_to" : "places/Saskatoon", 
    "_rev" : "_mWqkqe---_", 
    "travelTime" : 12 
  }, 
  { 
    "_key" : "31611", 
    "_id" : "connections/31611", 
    "_from" : "places/Saskatoon", 
    "_to" : "places/Winnipeg", 
    "_rev" : "_mWqkqe---A", 
    "travelTime" : 5 
  }, 
  { 
    "_key" : "31613", 
    "_id" : "connections/31613", 
    "_from" : "places/Saskatoon", 
    "_to" : "places/Edmonton", 
    "_rev" : "_mWqkqe---B", 
    "travelTime" : 12 
  }, 
  { 
    "_key" : "31615", 
    "_id" : "connections/31615", 
    "_from" : "places/Edmonton", 
    "_to" : "places/Saskatoon", 
    "_rev" : "_mWqkqe---C", 
    "travelTime" : 17 
  }, 
  { 
    "_key" : "31617", 
    "_id" : "connections/31617", 
    "_from" : "places/Edmonton", 
    "_to" : "places/Jasper", 
    "_rev" : "_mWqkqeC---", 
    "travelTime" : 6 
  }, 
  { 
    "_key" : "31619", 
    "_id" : "connections/31619", 
    "_from" : "places/Jasper", 
    "_to" : "places/Edmonton", 
    "_rev" : "_mWqkqeC--_", 
    "travelTime" : 5 
  }, 
  { 
    "_key" : "31621", 
    "_id" : "connections/31621", 
    "_from" : "places/Jasper", 
    "_to" : "places/Vancouver", 
    "_rev" : "_mWqkqeC--A", 
    "travelTime" : 12 
  }, 
  { 
    "_key" : "31623", 
    "_id" : "connections/31623", 
    "_from" : "places/Vancouver", 
    "_to" : "places/Jasper", 
    "_rev" : "_mWqkqeC--B", 
    "travelTime" : 13 
  } 
]

Mps Graph

The mps_graph has been created to demonstrate shortest path algorithms and the abbreviation stands for multiple path search.

The example graph consists of nodes in the mps_verts collection and edges in the mps_edges collection. It is a simple traversal graph with start node A and end node C.

Mps Graph

With the Shortest Path algorithm, you either get the shortest path A - B - C or A - D - C. With the All Shortest Paths algorithm, both shortest paths are returned.

Example of how to create the graph, inspect its nodes and edges, and delete it again:

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("mps_graph");
db.mps_verts.toArray();
db.mps_edges.toArray();
examples.dropGraph("mps_graph");
Show output
[ 
  { 
    "_key" : "A", 
    "_id" : "mps_verts/A", 
    "_rev" : "_mWqkqfS---" 
  }, 
  { 
    "_key" : "B", 
    "_id" : "mps_verts/B", 
    "_rev" : "_mWqkqfS--_" 
  }, 
  { 
    "_key" : "C", 
    "_id" : "mps_verts/C", 
    "_rev" : "_mWqkqfS--A" 
  }, 
  { 
    "_key" : "D", 
    "_id" : "mps_verts/D", 
    "_rev" : "_mWqkqfS--B" 
  }, 
  { 
    "_key" : "E", 
    "_id" : "mps_verts/E", 
    "_rev" : "_mWqkqfS--C" 
  }, 
  { 
    "_key" : "F", 
    "_id" : "mps_verts/F", 
    "_rev" : "_mWqkqfW---" 
  } 
]

[ 
  { 
    "_key" : "31687", 
    "_id" : "mps_edges/31687", 
    "_from" : "mps_verts/A", 
    "_to" : "mps_verts/B", 
    "_rev" : "_mWqkqfW--_", 
    "vertex" : "A" 
  }, 
  { 
    "_key" : "31689", 
    "_id" : "mps_edges/31689", 
    "_from" : "mps_verts/A", 
    "_to" : "mps_verts/E", 
    "_rev" : "_mWqkqfW--A", 
    "vertex" : "A" 
  }, 
  { 
    "_key" : "31691", 
    "_id" : "mps_edges/31691", 
    "_from" : "mps_verts/A", 
    "_to" : "mps_verts/D", 
    "_rev" : "_mWqkqfW--B", 
    "vertex" : "A" 
  }, 
  { 
    "_key" : "31693", 
    "_id" : "mps_edges/31693", 
    "_from" : "mps_verts/B", 
    "_to" : "mps_verts/C", 
    "_rev" : "_mWqkqfW--C", 
    "vertex" : "B" 
  }, 
  { 
    "_key" : "31695", 
    "_id" : "mps_edges/31695", 
    "_from" : "mps_verts/D", 
    "_to" : "mps_verts/C", 
    "_rev" : "_mWqkqfa---", 
    "vertex" : "D" 
  }, 
  { 
    "_key" : "31697", 
    "_id" : "mps_edges/31697", 
    "_from" : "mps_verts/E", 
    "_to" : "mps_verts/F", 
    "_rev" : "_mWqkqfa--_", 
    "vertex" : "E" 
  }, 
  { 
    "_key" : "31699", 
    "_id" : "mps_edges/31699", 
    "_from" : "mps_verts/F", 
    "_to" : "mps_verts/C", 
    "_rev" : "_mWqkqfa--A", 
    "vertex" : "F" 
  } 
]

World Graph

The worldCountry graph has as node structure as follows:

world → continent → country → capital

World Graph

In some cases, edge directions aren’t forward. Therefore, it may get displayed disjunct in the graph viewer.

You can create the graph as a named graph using the name worldCountry, or as an anonymous graph (node and edge collections only) using the name worldCountryUnManaged.

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("worldCountry");
db.worldVertices.toArray();
db.worldEdges.toArray();
examples.dropGraph("worldCountry");
var g = examples.loadGraph("worldCountryUnManaged");
examples.dropGraph("worldCountryUnManaged");
Show output
[ 
  { 
    "_key" : "world", 
    "_id" : "worldVertices/world", 
    "_rev" : "_mWqkqgK---", 
    "name" : "World", 
    "type" : "root" 
  }, 
  { 
    "_key" : "continent-africa", 
    "_id" : "worldVertices/continent-africa", 
    "_rev" : "_mWqkqgO---", 
    "name" : "Africa", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-asia", 
    "_id" : "worldVertices/continent-asia", 
    "_rev" : "_mWqkqgO--_", 
    "name" : "Asia", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-australia", 
    "_id" : "worldVertices/continent-australia", 
    "_rev" : "_mWqkqgO--A", 
    "name" : "Australia", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-europe", 
    "_id" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqgO--B", 
    "name" : "Europe", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-north-america", 
    "_id" : "worldVertices/continent-north-america", 
    "_rev" : "_mWqkqgS---", 
    "name" : "North America", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-south-america", 
    "_id" : "worldVertices/continent-south-america", 
    "_rev" : "_mWqkqgS--_", 
    "name" : "South America", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "country-afghanistan", 
    "_id" : "worldVertices/country-afghanistan", 
    "_rev" : "_mWqkqgS--A", 
    "name" : "Afghanistan", 
    "type" : "country", 
    "code" : "AFG" 
  }, 
  { 
    "_key" : "country-albania", 
    "_id" : "worldVertices/country-albania", 
    "_rev" : "_mWqkqgS--B", 
    "name" : "Albania", 
    "type" : "country", 
    "code" : "ALB" 
  }, 
  { 
    "_key" : "country-algeria", 
    "_id" : "worldVertices/country-algeria", 
    "_rev" : "_mWqkqgW---", 
    "name" : "Algeria", 
    "type" : "country", 
    "code" : "DZA" 
  }, 
  { 
    "_key" : "country-andorra", 
    "_id" : "worldVertices/country-andorra", 
    "_rev" : "_mWqkqgW--_", 
    "name" : "Andorra", 
    "type" : "country", 
    "code" : "AND" 
  }, 
  { 
    "_key" : "country-angola", 
    "_id" : "worldVertices/country-angola", 
    "_rev" : "_mWqkqgW--A", 
    "name" : "Angola", 
    "type" : "country", 
    "code" : "AGO" 
  }, 
  { 
    "_key" : "country-antigua-and-barbuda", 
    "_id" : "worldVertices/country-antigua-and-barbuda", 
    "_rev" : "_mWqkqgW--B", 
    "name" : "Antigua and Barbuda", 
    "type" : "country", 
    "code" : "ATG" 
  }, 
  { 
    "_key" : "country-argentina", 
    "_id" : "worldVertices/country-argentina", 
    "_rev" : "_mWqkqgW--C", 
    "name" : "Argentina", 
    "type" : "country", 
    "code" : "ARG" 
  }, 
  { 
    "_key" : "country-australia", 
    "_id" : "worldVertices/country-australia", 
    "_rev" : "_mWqkqga---", 
    "name" : "Australia", 
    "type" : "country", 
    "code" : "AUS" 
  }, 
  { 
    "_key" : "country-austria", 
    "_id" : "worldVertices/country-austria", 
    "_rev" : "_mWqkqga--_", 
    "name" : "Austria", 
    "type" : "country", 
    "code" : "AUT" 
  }, 
  { 
    "_key" : "country-bahamas", 
    "_id" : "worldVertices/country-bahamas", 
    "_rev" : "_mWqkqga--A", 
    "name" : "Bahamas", 
    "type" : "country", 
    "code" : "BHS" 
  }, 
  { 
    "_key" : "country-bahrain", 
    "_id" : "worldVertices/country-bahrain", 
    "_rev" : "_mWqkqga--B", 
    "name" : "Bahrain", 
    "type" : "country", 
    "code" : "BHR" 
  }, 
  { 
    "_key" : "country-bangladesh", 
    "_id" : "worldVertices/country-bangladesh", 
    "_rev" : "_mWqkqga--C", 
    "name" : "Bangladesh", 
    "type" : "country", 
    "code" : "BGD" 
  }, 
  { 
    "_key" : "country-barbados", 
    "_id" : "worldVertices/country-barbados", 
    "_rev" : "_mWqkqge---", 
    "name" : "Barbados", 
    "type" : "country", 
    "code" : "BRB" 
  }, 
  { 
    "_key" : "country-belgium", 
    "_id" : "worldVertices/country-belgium", 
    "_rev" : "_mWqkqge--_", 
    "name" : "Belgium", 
    "type" : "country", 
    "code" : "BEL" 
  }, 
  { 
    "_key" : "country-bhutan", 
    "_id" : "worldVertices/country-bhutan", 
    "_rev" : "_mWqkqge--A", 
    "name" : "Bhutan", 
    "type" : "country", 
    "code" : "BTN" 
  }, 
  { 
    "_key" : "country-bolivia", 
    "_id" : "worldVertices/country-bolivia", 
    "_rev" : "_mWqkqge--B", 
    "name" : "Bolivia", 
    "type" : "country", 
    "code" : "BOL" 
  }, 
  { 
    "_key" : "country-bosnia-and-herzegovina", 
    "_id" : "worldVertices/country-bosnia-and-herzegovina", 
    "_rev" : "_mWqkqge--C", 
    "name" : "Bosnia and Herzegovina", 
    "type" : "country", 
    "code" : "BIH" 
  }, 
  { 
    "_key" : "country-botswana", 
    "_id" : "worldVertices/country-botswana", 
    "_rev" : "_mWqkqgi---", 
    "name" : "Botswana", 
    "type" : "country", 
    "code" : "BWA" 
  }, 
  { 
    "_key" : "country-brazil", 
    "_id" : "worldVertices/country-brazil", 
    "_rev" : "_mWqkqgi--_", 
    "name" : "Brazil", 
    "type" : "country", 
    "code" : "BRA" 
  }, 
  { 
    "_key" : "country-brunei", 
    "_id" : "worldVertices/country-brunei", 
    "_rev" : "_mWqkqgi--A", 
    "name" : "Brunei", 
    "type" : "country", 
    "code" : "BRN" 
  }, 
  { 
    "_key" : "country-bulgaria", 
    "_id" : "worldVertices/country-bulgaria", 
    "_rev" : "_mWqkqgi--B", 
    "name" : "Bulgaria", 
    "type" : "country", 
    "code" : "BGR" 
  }, 
  { 
    "_key" : "country-burkina-faso", 
    "_id" : "worldVertices/country-burkina-faso", 
    "_rev" : "_mWqkqgi--C", 
    "name" : "Burkina Faso", 
    "type" : "country", 
    "code" : "BFA" 
  }, 
  { 
    "_key" : "country-burundi", 
    "_id" : "worldVertices/country-burundi", 
    "_rev" : "_mWqkqgm---", 
    "name" : "Burundi", 
    "type" : "country", 
    "code" : "BDI" 
  }, 
  { 
    "_key" : "country-cambodia", 
    "_id" : "worldVertices/country-cambodia", 
    "_rev" : "_mWqkqgm--_", 
    "name" : "Cambodia", 
    "type" : "country", 
    "code" : "KHM" 
  }, 
  { 
    "_key" : "country-cameroon", 
    "_id" : "worldVertices/country-cameroon", 
    "_rev" : "_mWqkqgm--A", 
    "name" : "Cameroon", 
    "type" : "country", 
    "code" : "CMR" 
  }, 
  { 
    "_key" : "country-canada", 
    "_id" : "worldVertices/country-canada", 
    "_rev" : "_mWqkqgm--B", 
    "name" : "Canada", 
    "type" : "country", 
    "code" : "CAN" 
  }, 
  { 
    "_key" : "country-chad", 
    "_id" : "worldVertices/country-chad", 
    "_rev" : "_mWqkqgm--C", 
    "name" : "Chad", 
    "type" : "country", 
    "code" : "TCD" 
  }, 
  { 
    "_key" : "country-chile", 
    "_id" : "worldVertices/country-chile", 
    "_rev" : "_mWqkqgm--D", 
    "name" : "Chile", 
    "type" : "country", 
    "code" : "CHL" 
  }, 
  { 
    "_key" : "country-colombia", 
    "_id" : "worldVertices/country-colombia", 
    "_rev" : "_mWqkqgq---", 
    "name" : "Colombia", 
    "type" : "country", 
    "code" : "COL" 
  }, 
  { 
    "_key" : "country-cote-d-ivoire", 
    "_id" : "worldVertices/country-cote-d-ivoire", 
    "_rev" : "_mWqkqgq--_", 
    "name" : "Cote d'Ivoire", 
    "type" : "country", 
    "code" : "CIV" 
  }, 
  { 
    "_key" : "country-croatia", 
    "_id" : "worldVertices/country-croatia", 
    "_rev" : "_mWqkqgq--A", 
    "name" : "Croatia", 
    "type" : "country", 
    "code" : "HRV" 
  }, 
  { 
    "_key" : "country-czech-republic", 
    "_id" : "worldVertices/country-czech-republic", 
    "_rev" : "_mWqkqgq--B", 
    "name" : "Czech Republic", 
    "type" : "country", 
    "code" : "CZE" 
  }, 
  { 
    "_key" : "country-denmark", 
    "_id" : "worldVertices/country-denmark", 
    "_rev" : "_mWqkqgu---", 
    "name" : "Denmark", 
    "type" : "country", 
    "code" : "DNK" 
  }, 
  { 
    "_key" : "country-ecuador", 
    "_id" : "worldVertices/country-ecuador", 
    "_rev" : "_mWqkqgu--_", 
    "name" : "Ecuador", 
    "type" : "country", 
    "code" : "ECU" 
  }, 
  { 
    "_key" : "country-egypt", 
    "_id" : "worldVertices/country-egypt", 
    "_rev" : "_mWqkqgu--A", 
    "name" : "Egypt", 
    "type" : "country", 
    "code" : "EGY" 
  }, 
  { 
    "_key" : "country-eritrea", 
    "_id" : "worldVertices/country-eritrea", 
    "_rev" : "_mWqkqgu--B", 
    "name" : "Eritrea", 
    "type" : "country", 
    "code" : "ERI" 
  }, 
  { 
    "_key" : "country-finland", 
    "_id" : "worldVertices/country-finland", 
    "_rev" : "_mWqkqgu--C", 
    "name" : "Finland", 
    "type" : "country", 
    "code" : "FIN" 
  }, 
  { 
    "_key" : "country-france", 
    "_id" : "worldVertices/country-france", 
    "_rev" : "_mWqkqgy---", 
    "name" : "France", 
    "type" : "country", 
    "code" : "FRA" 
  }, 
  { 
    "_key" : "country-germany", 
    "_id" : "worldVertices/country-germany", 
    "_rev" : "_mWqkqgy--_", 
    "name" : "Germany", 
    "type" : "country", 
    "code" : "DEU" 
  }, 
  { 
    "_key" : "country-people-s-republic-of-china", 
    "_id" : "worldVertices/country-people-s-republic-of-china", 
    "_rev" : "_mWqkqgy--A", 
    "name" : "People's Republic of China", 
    "type" : "country", 
    "code" : "CHN" 
  }, 
  { 
    "_key" : "capital-algiers", 
    "_id" : "worldVertices/capital-algiers", 
    "_rev" : "_mWqkqgy--B", 
    "name" : "Algiers", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-andorra-la-vella", 
    "_id" : "worldVertices/capital-andorra-la-vella", 
    "_rev" : "_mWqkqgy--C", 
    "name" : "Andorra la Vella", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-asmara", 
    "_id" : "worldVertices/capital-asmara", 
    "_rev" : "_mWqkqg2---", 
    "name" : "Asmara", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bandar-seri-begawan", 
    "_id" : "worldVertices/capital-bandar-seri-begawan", 
    "_rev" : "_mWqkqg2--_", 
    "name" : "Bandar Seri Begawan", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-beijing", 
    "_id" : "worldVertices/capital-beijing", 
    "_rev" : "_mWqkqg2--A", 
    "name" : "Beijing", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-berlin", 
    "_id" : "worldVertices/capital-berlin", 
    "_rev" : "_mWqkqg2--B", 
    "name" : "Berlin", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bogota", 
    "_id" : "worldVertices/capital-bogota", 
    "_rev" : "_mWqkqg2--C", 
    "name" : "Bogota", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-brasilia", 
    "_id" : "worldVertices/capital-brasilia", 
    "_rev" : "_mWqkqg6---", 
    "name" : "Brasilia", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bridgetown", 
    "_id" : "worldVertices/capital-bridgetown", 
    "_rev" : "_mWqkqg6--_", 
    "name" : "Bridgetown", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-brussels", 
    "_id" : "worldVertices/capital-brussels", 
    "_rev" : "_mWqkqg6--A", 
    "name" : "Brussels", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-buenos-aires", 
    "_id" : "worldVertices/capital-buenos-aires", 
    "_rev" : "_mWqkqg6--B", 
    "name" : "Buenos Aires", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bujumbura", 
    "_id" : "worldVertices/capital-bujumbura", 
    "_rev" : "_mWqkqg6--C", 
    "name" : "Bujumbura", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-cairo", 
    "_id" : "worldVertices/capital-cairo", 
    "_rev" : "_mWqkqh----", 
    "name" : "Cairo", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-canberra", 
    "_id" : "worldVertices/capital-canberra", 
    "_rev" : "_mWqkqh---_", 
    "name" : "Canberra", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-copenhagen", 
    "_id" : "worldVertices/capital-copenhagen", 
    "_rev" : "_mWqkqh---A", 
    "name" : "Copenhagen", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-dhaka", 
    "_id" : "worldVertices/capital-dhaka", 
    "_rev" : "_mWqkqh---B", 
    "name" : "Dhaka", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-gaborone", 
    "_id" : "worldVertices/capital-gaborone", 
    "_rev" : "_mWqkqh---C", 
    "name" : "Gaborone", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-helsinki", 
    "_id" : "worldVertices/capital-helsinki", 
    "_rev" : "_mWqkqhC---", 
    "name" : "Helsinki", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-kabul", 
    "_id" : "worldVertices/capital-kabul", 
    "_rev" : "_mWqkqhC--_", 
    "name" : "Kabul", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-la-paz", 
    "_id" : "worldVertices/capital-la-paz", 
    "_rev" : "_mWqkqhC--A", 
    "name" : "La Paz", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-luanda", 
    "_id" : "worldVertices/capital-luanda", 
    "_rev" : "_mWqkqhC--B", 
    "name" : "Luanda", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-manama", 
    "_id" : "worldVertices/capital-manama", 
    "_rev" : "_mWqkqhC--C", 
    "name" : "Manama", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-nassau", 
    "_id" : "worldVertices/capital-nassau", 
    "_rev" : "_mWqkqhG---", 
    "name" : "Nassau", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-n-djamena", 
    "_id" : "worldVertices/capital-n-djamena", 
    "_rev" : "_mWqkqhG--_", 
    "name" : "N'Djamena", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-ottawa", 
    "_id" : "worldVertices/capital-ottawa", 
    "_rev" : "_mWqkqhG--A", 
    "name" : "Ottawa", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-ouagadougou", 
    "_id" : "worldVertices/capital-ouagadougou", 
    "_rev" : "_mWqkqhG--B", 
    "name" : "Ouagadougou", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-paris", 
    "_id" : "worldVertices/capital-paris", 
    "_rev" : "_mWqkqhK---", 
    "name" : "Paris", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-phnom-penh", 
    "_id" : "worldVertices/capital-phnom-penh", 
    "_rev" : "_mWqkqhK--_", 
    "name" : "Phnom Penh", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-prague", 
    "_id" : "worldVertices/capital-prague", 
    "_rev" : "_mWqkqhK--A", 
    "name" : "Prague", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-quito", 
    "_id" : "worldVertices/capital-quito", 
    "_rev" : "_mWqkqhK--B", 
    "name" : "Quito", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-saint-john-s", 
    "_id" : "worldVertices/capital-saint-john-s", 
    "_rev" : "_mWqkqhK--C", 
    "name" : "Saint John's", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-santiago", 
    "_id" : "worldVertices/capital-santiago", 
    "_rev" : "_mWqkqhK--D", 
    "name" : "Santiago", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-sarajevo", 
    "_id" : "worldVertices/capital-sarajevo", 
    "_rev" : "_mWqkqhO---", 
    "name" : "Sarajevo", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-sofia", 
    "_id" : "worldVertices/capital-sofia", 
    "_rev" : "_mWqkqhO--_", 
    "name" : "Sofia", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-thimphu", 
    "_id" : "worldVertices/capital-thimphu", 
    "_rev" : "_mWqkqhO--A", 
    "name" : "Thimphu", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-tirana", 
    "_id" : "worldVertices/capital-tirana", 
    "_rev" : "_mWqkqhO--B", 
    "name" : "Tirana", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-vienna", 
    "_id" : "worldVertices/capital-vienna", 
    "_rev" : "_mWqkqhO--C", 
    "name" : "Vienna", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-yamoussoukro", 
    "_id" : "worldVertices/capital-yamoussoukro", 
    "_rev" : "_mWqkqhO--D", 
    "name" : "Yamoussoukro", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-yaounde", 
    "_id" : "worldVertices/capital-yaounde", 
    "_rev" : "_mWqkqhS---", 
    "name" : "Yaounde", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-zagreb", 
    "_id" : "worldVertices/capital-zagreb", 
    "_rev" : "_mWqkqhS--_", 
    "name" : "Zagreb", 
    "type" : "capital" 
  } 
]

[ 
  { 
    "_key" : "31844", 
    "_id" : "worldEdges/31844", 
    "_from" : "worldVertices/continent-africa", 
    "_to" : "worldVertices/world", 
    "_rev" : "_mWqkqhS--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31846", 
    "_id" : "worldEdges/31846", 
    "_from" : "worldVertices/continent-asia", 
    "_to" : "worldVertices/world", 
    "_rev" : "_mWqkqhS--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31848", 
    "_id" : "worldEdges/31848", 
    "_from" : "worldVertices/continent-australia", 
    "_to" : "worldVertices/world", 
    "_rev" : "_mWqkqhS--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31850", 
    "_id" : "worldEdges/31850", 
    "_from" : "worldVertices/continent-europe", 
    "_to" : "worldVertices/world", 
    "_rev" : "_mWqkqhW---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31852", 
    "_id" : "worldEdges/31852", 
    "_from" : "worldVertices/continent-north-america", 
    "_to" : "worldVertices/world", 
    "_rev" : "_mWqkqhW--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31854", 
    "_id" : "worldEdges/31854", 
    "_from" : "worldVertices/continent-south-america", 
    "_to" : "worldVertices/world", 
    "_rev" : "_mWqkqhW--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31856", 
    "_id" : "worldEdges/31856", 
    "_from" : "worldVertices/country-afghanistan", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_mWqkqhW--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31858", 
    "_id" : "worldEdges/31858", 
    "_from" : "worldVertices/country-albania", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqhW--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31860", 
    "_id" : "worldEdges/31860", 
    "_from" : "worldVertices/country-algeria", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_mWqkqhW--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31862", 
    "_id" : "worldEdges/31862", 
    "_from" : "worldVertices/country-andorra", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqha---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31864", 
    "_id" : "worldEdges/31864", 
    "_from" : "worldVertices/country-angola", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_mWqkqha--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31866", 
    "_id" : "worldEdges/31866", 
    "_from" : "worldVertices/country-antigua-and-barbuda", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_mWqkqha--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31868", 
    "_id" : "worldEdges/31868", 
    "_from" : "worldVertices/country-argentina", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_mWqkqha--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31870", 
    "_id" : "worldEdges/31870", 
    "_from" : "worldVertices/country-australia", 
    "_to" : "worldVertices/continent-australia", 
    "_rev" : "_mWqkqha--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31872", 
    "_id" : "worldEdges/31872", 
    "_from" : "worldVertices/country-austria", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqhe---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31874", 
    "_id" : "worldEdges/31874", 
    "_from" : "worldVertices/country-bahamas", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_mWqkqhe--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31876", 
    "_id" : "worldEdges/31876", 
    "_from" : "worldVertices/country-bahrain", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_mWqkqhe--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31878", 
    "_id" : "worldEdges/31878", 
    "_from" : "worldVertices/country-bangladesh", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_mWqkqhe--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31880", 
    "_id" : "worldEdges/31880", 
    "_from" : "worldVertices/country-barbados", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_mWqkqhe--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31882", 
    "_id" : "worldEdges/31882", 
    "_from" : "worldVertices/country-belgium", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqhi---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31884", 
    "_id" : "worldEdges/31884", 
    "_from" : "worldVertices/country-bhutan", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_mWqkqhi--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31886", 
    "_id" : "worldEdges/31886", 
    "_from" : "worldVertices/country-bolivia", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_mWqkqhi--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31888", 
    "_id" : "worldEdges/31888", 
    "_from" : "worldVertices/country-bosnia-and-herzegovina", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqhi--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31890", 
    "_id" : "worldEdges/31890", 
    "_from" : "worldVertices/country-botswana", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_mWqkqhi--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31892", 
    "_id" : "worldEdges/31892", 
    "_from" : "worldVertices/country-brazil", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_mWqkqhm---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31894", 
    "_id" : "worldEdges/31894", 
    "_from" : "worldVertices/country-brunei", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_mWqkqhm--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31896", 
    "_id" : "worldEdges/31896", 
    "_from" : "worldVertices/country-bulgaria", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqhm--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31898", 
    "_id" : "worldEdges/31898", 
    "_from" : "worldVertices/country-burkina-faso", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_mWqkqhm--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31900", 
    "_id" : "worldEdges/31900", 
    "_from" : "worldVertices/country-burundi", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_mWqkqhm--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31902", 
    "_id" : "worldEdges/31902", 
    "_from" : "worldVertices/country-cambodia", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_mWqkqhq---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31904", 
    "_id" : "worldEdges/31904", 
    "_from" : "worldVertices/country-cameroon", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_mWqkqhq--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31906", 
    "_id" : "worldEdges/31906", 
    "_from" : "worldVertices/country-canada", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_mWqkqhq--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31908", 
    "_id" : "worldEdges/31908", 
    "_from" : "worldVertices/country-chad", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_mWqkqhq--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31910", 
    "_id" : "worldEdges/31910", 
    "_from" : "worldVertices/country-chile", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_mWqkqhq--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31912", 
    "_id" : "worldEdges/31912", 
    "_from" : "worldVertices/country-colombia", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_mWqkqhq--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31914", 
    "_id" : "worldEdges/31914", 
    "_from" : "worldVertices/country-cote-d-ivoire", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_mWqkqhu---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31916", 
    "_id" : "worldEdges/31916", 
    "_from" : "worldVertices/country-croatia", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqhu--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31918", 
    "_id" : "worldEdges/31918", 
    "_from" : "worldVertices/country-czech-republic", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqhu--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31920", 
    "_id" : "worldEdges/31920", 
    "_from" : "worldVertices/country-denmark", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqhu--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31922", 
    "_id" : "worldEdges/31922", 
    "_from" : "worldVertices/country-ecuador", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_mWqkqhu--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31924", 
    "_id" : "worldEdges/31924", 
    "_from" : "worldVertices/country-egypt", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_mWqkqhy---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31926", 
    "_id" : "worldEdges/31926", 
    "_from" : "worldVertices/country-eritrea", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_mWqkqhy--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31928", 
    "_id" : "worldEdges/31928", 
    "_from" : "worldVertices/country-finland", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqhy--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31930", 
    "_id" : "worldEdges/31930", 
    "_from" : "worldVertices/country-france", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqhy--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31932", 
    "_id" : "worldEdges/31932", 
    "_from" : "worldVertices/country-germany", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_mWqkqhy--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31934", 
    "_id" : "worldEdges/31934", 
    "_from" : "worldVertices/country-people-s-republic-of-china", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_mWqkqhy--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31936", 
    "_id" : "worldEdges/31936", 
    "_from" : "worldVertices/capital-algiers", 
    "_to" : "worldVertices/country-algeria", 
    "_rev" : "_mWqkqh2---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31938", 
    "_id" : "worldEdges/31938", 
    "_from" : "worldVertices/capital-andorra-la-vella", 
    "_to" : "worldVertices/country-andorra", 
    "_rev" : "_mWqkqh2--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31940", 
    "_id" : "worldEdges/31940", 
    "_from" : "worldVertices/capital-asmara", 
    "_to" : "worldVertices/country-eritrea", 
    "_rev" : "_mWqkqh2--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31942", 
    "_id" : "worldEdges/31942", 
    "_from" : "worldVertices/capital-bandar-seri-begawan", 
    "_to" : "worldVertices/country-brunei", 
    "_rev" : "_mWqkqh2--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31944", 
    "_id" : "worldEdges/31944", 
    "_from" : "worldVertices/capital-beijing", 
    "_to" : "worldVertices/country-people-s-republic-of-china", 
    "_rev" : "_mWqkqh2--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31946", 
    "_id" : "worldEdges/31946", 
    "_from" : "worldVertices/capital-berlin", 
    "_to" : "worldVertices/country-germany", 
    "_rev" : "_mWqkqh2--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31948", 
    "_id" : "worldEdges/31948", 
    "_from" : "worldVertices/capital-bogota", 
    "_to" : "worldVertices/country-colombia", 
    "_rev" : "_mWqkqh6---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31950", 
    "_id" : "worldEdges/31950", 
    "_from" : "worldVertices/capital-brasilia", 
    "_to" : "worldVertices/country-brazil", 
    "_rev" : "_mWqkqh6--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31952", 
    "_id" : "worldEdges/31952", 
    "_from" : "worldVertices/capital-bridgetown", 
    "_to" : "worldVertices/country-barbados", 
    "_rev" : "_mWqkqh6--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31954", 
    "_id" : "worldEdges/31954", 
    "_from" : "worldVertices/capital-brussels", 
    "_to" : "worldVertices/country-belgium", 
    "_rev" : "_mWqkqh6--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31956", 
    "_id" : "worldEdges/31956", 
    "_from" : "worldVertices/capital-buenos-aires", 
    "_to" : "worldVertices/country-argentina", 
    "_rev" : "_mWqkqi----", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31958", 
    "_id" : "worldEdges/31958", 
    "_from" : "worldVertices/capital-bujumbura", 
    "_to" : "worldVertices/country-burundi", 
    "_rev" : "_mWqkqi---_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31960", 
    "_id" : "worldEdges/31960", 
    "_from" : "worldVertices/capital-cairo", 
    "_to" : "worldVertices/country-egypt", 
    "_rev" : "_mWqkqi---A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31962", 
    "_id" : "worldEdges/31962", 
    "_from" : "worldVertices/capital-canberra", 
    "_to" : "worldVertices/country-australia", 
    "_rev" : "_mWqkqi---B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31964", 
    "_id" : "worldEdges/31964", 
    "_from" : "worldVertices/capital-copenhagen", 
    "_to" : "worldVertices/country-denmark", 
    "_rev" : "_mWqkqiC---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31966", 
    "_id" : "worldEdges/31966", 
    "_from" : "worldVertices/capital-dhaka", 
    "_to" : "worldVertices/country-bangladesh", 
    "_rev" : "_mWqkqiC--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31968", 
    "_id" : "worldEdges/31968", 
    "_from" : "worldVertices/capital-gaborone", 
    "_to" : "worldVertices/country-botswana", 
    "_rev" : "_mWqkqiC--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31970", 
    "_id" : "worldEdges/31970", 
    "_from" : "worldVertices/capital-helsinki", 
    "_to" : "worldVertices/country-finland", 
    "_rev" : "_mWqkqiC--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31972", 
    "_id" : "worldEdges/31972", 
    "_from" : "worldVertices/capital-kabul", 
    "_to" : "worldVertices/country-afghanistan", 
    "_rev" : "_mWqkqiC--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31974", 
    "_id" : "worldEdges/31974", 
    "_from" : "worldVertices/capital-la-paz", 
    "_to" : "worldVertices/country-bolivia", 
    "_rev" : "_mWqkqiG---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31976", 
    "_id" : "worldEdges/31976", 
    "_from" : "worldVertices/capital-luanda", 
    "_to" : "worldVertices/country-angola", 
    "_rev" : "_mWqkqiG--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31978", 
    "_id" : "worldEdges/31978", 
    "_from" : "worldVertices/capital-manama", 
    "_to" : "worldVertices/country-bahrain", 
    "_rev" : "_mWqkqiG--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31980", 
    "_id" : "worldEdges/31980", 
    "_from" : "worldVertices/capital-nassau", 
    "_to" : "worldVertices/country-bahamas", 
    "_rev" : "_mWqkqiG--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31982", 
    "_id" : "worldEdges/31982", 
    "_from" : "worldVertices/capital-n-djamena", 
    "_to" : "worldVertices/country-chad", 
    "_rev" : "_mWqkqiG--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31984", 
    "_id" : "worldEdges/31984", 
    "_from" : "worldVertices/capital-ottawa", 
    "_to" : "worldVertices/country-canada", 
    "_rev" : "_mWqkqiK---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31986", 
    "_id" : "worldEdges/31986", 
    "_from" : "worldVertices/capital-ouagadougou", 
    "_to" : "worldVertices/country-burkina-faso", 
    "_rev" : "_mWqkqiK--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31988", 
    "_id" : "worldEdges/31988", 
    "_from" : "worldVertices/capital-paris", 
    "_to" : "worldVertices/country-france", 
    "_rev" : "_mWqkqiK--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31990", 
    "_id" : "worldEdges/31990", 
    "_from" : "worldVertices/capital-phnom-penh", 
    "_to" : "worldVertices/country-cambodia", 
    "_rev" : "_mWqkqiK--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31992", 
    "_id" : "worldEdges/31992", 
    "_from" : "worldVertices/capital-prague", 
    "_to" : "worldVertices/country-czech-republic", 
    "_rev" : "_mWqkqiO---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31994", 
    "_id" : "worldEdges/31994", 
    "_from" : "worldVertices/capital-quito", 
    "_to" : "worldVertices/country-ecuador", 
    "_rev" : "_mWqkqiO--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31996", 
    "_id" : "worldEdges/31996", 
    "_from" : "worldVertices/capital-saint-john-s", 
    "_to" : "worldVertices/country-antigua-and-barbuda", 
    "_rev" : "_mWqkqiO--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "31998", 
    "_id" : "worldEdges/31998", 
    "_from" : "worldVertices/capital-santiago", 
    "_to" : "worldVertices/country-chile", 
    "_rev" : "_mWqkqiO--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "32000", 
    "_id" : "worldEdges/32000", 
    "_from" : "worldVertices/capital-sarajevo", 
    "_to" : "worldVertices/country-bosnia-and-herzegovina", 
    "_rev" : "_mWqkqiO--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "32002", 
    "_id" : "worldEdges/32002", 
    "_from" : "worldVertices/capital-sofia", 
    "_to" : "worldVertices/country-bulgaria", 
    "_rev" : "_mWqkqiS---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "32004", 
    "_id" : "worldEdges/32004", 
    "_from" : "worldVertices/capital-thimphu", 
    "_to" : "worldVertices/country-bhutan", 
    "_rev" : "_mWqkqiS--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "32006", 
    "_id" : "worldEdges/32006", 
    "_from" : "worldVertices/capital-tirana", 
    "_to" : "worldVertices/country-albania", 
    "_rev" : "_mWqkqiS--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "32008", 
    "_id" : "worldEdges/32008", 
    "_from" : "worldVertices/capital-vienna", 
    "_to" : "worldVertices/country-austria", 
    "_rev" : "_mWqkqiS--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "32010", 
    "_id" : "worldEdges/32010", 
    "_from" : "worldVertices/capital-yamoussoukro", 
    "_to" : "worldVertices/country-cote-d-ivoire", 
    "_rev" : "_mWqkqiS--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "32012", 
    "_id" : "worldEdges/32012", 
    "_from" : "worldVertices/capital-yaounde", 
    "_to" : "worldVertices/country-cameroon", 
    "_rev" : "_mWqkqiW---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "32014", 
    "_id" : "worldEdges/32014", 
    "_from" : "worldVertices/capital-zagreb", 
    "_to" : "worldVertices/country-croatia", 
    "_rev" : "_mWqkqiW--_", 
    "type" : "is-in" 
  } 
]

Social Graph

The social graph is a set of persons and their relations. The graph has female and male persons as nodes in two node collections. The edges are their connections and stored in the relation edge collection.

Social Example Graph

Example of how to create the graph, inspect its nodes and edges, and delete it again:

var examples = require("@arangodb/graph-examples/example-graph");
var graph = examples.loadGraph("social");
db.female.toArray()
db.male.toArray()
db.relation.toArray()
examples.dropGraph("social");
Show output
[ 
  { 
    "_key" : "alice", 
    "_id" : "female/alice", 
    "_rev" : "_mWqkqoO---", 
    "name" : "Alice" 
  }, 
  { 
    "_key" : "diana", 
    "_id" : "female/diana", 
    "_rev" : "_mWqkqoS--_", 
    "name" : "Diana" 
  } 
]

[ 
  { 
    "_key" : "bob", 
    "_id" : "male/bob", 
    "_rev" : "_mWqkqoO--_", 
    "name" : "Bob" 
  }, 
  { 
    "_key" : "charly", 
    "_id" : "male/charly", 
    "_rev" : "_mWqkqoS---", 
    "name" : "Charly" 
  } 
]

[ 
  { 
    "_key" : "32357", 
    "_id" : "relation/32357", 
    "_from" : "female/alice", 
    "_to" : "male/bob", 
    "_rev" : "_mWqkqoS--A", 
    "type" : "married", 
    "vertex" : "alice" 
  }, 
  { 
    "_key" : "32359", 
    "_id" : "relation/32359", 
    "_from" : "female/alice", 
    "_to" : "male/charly", 
    "_rev" : "_mWqkqoS--B", 
    "type" : "friend", 
    "vertex" : "alice" 
  }, 
  { 
    "_key" : "32361", 
    "_id" : "relation/32361", 
    "_from" : "male/charly", 
    "_to" : "female/diana", 
    "_rev" : "_mWqkqoW---", 
    "type" : "married", 
    "vertex" : "charly" 
  }, 
  { 
    "_key" : "32363", 
    "_id" : "relation/32363", 
    "_from" : "male/bob", 
    "_to" : "female/diana", 
    "_rev" : "_mWqkqoW--_", 
    "type" : "friend", 
    "vertex" : "bob" 
  } 
]

City Graph

The routeplanner graph is a set of european cities and their fictional traveling distances as connections. The graph has the cities as nodes in multiple node collections (germanCity and frenchCity). The edges are their interconnections in several edge collections (frenchHighway, germanHighway, internationalHighway).

Cities Example Graph

Example of how to create the graph, inspect its edges and nodes, and delete it again:

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("routeplanner");
db.frenchCity.toArray();
db.germanCity.toArray();
db.germanHighway.toArray();
db.frenchHighway.toArray();
db.internationalHighway.toArray();
examples.dropGraph("routeplanner");
Show output
[ 
  { 
    "_key" : "Lyon", 
    "_id" : "frenchCity/Lyon", 
    "_rev" : "_mWqkqqS--_", 
    "population" : 80000, 
    "isCapital" : false, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        4.84, 
        45.76 
      ] 
    } 
  }, 
  { 
    "_key" : "Paris", 
    "_id" : "frenchCity/Paris", 
    "_rev" : "_mWqkqqS--A", 
    "population" : 4000000, 
    "isCapital" : true, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        2.3508, 
        48.8567 
      ] 
    } 
  } 
]

[ 
  { 
    "_key" : "Berlin", 
    "_id" : "germanCity/Berlin", 
    "_rev" : "_mWqkqqO---", 
    "population" : 3000000, 
    "isCapital" : true, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        13.3833, 
        52.5167 
      ] 
    } 
  }, 
  { 
    "_key" : "Cologne", 
    "_id" : "germanCity/Cologne", 
    "_rev" : "_mWqkqqO--_", 
    "population" : 1000000, 
    "isCapital" : false, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        6.9528, 
        50.9364 
      ] 
    } 
  }, 
  { 
    "_key" : "Hamburg", 
    "_id" : "germanCity/Hamburg", 
    "_rev" : "_mWqkqqS---", 
    "population" : 1000000, 
    "isCapital" : false, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        10.0014, 
        53.5653 
      ] 
    } 
  } 
]

[ 
  { 
    "_key" : "32460", 
    "_id" : "germanHighway/32460", 
    "_from" : "germanCity/Berlin", 
    "_to" : "germanCity/Cologne", 
    "_rev" : "_mWqkqqW--_", 
    "distance" : 850 
  }, 
  { 
    "_key" : "32462", 
    "_id" : "germanHighway/32462", 
    "_from" : "germanCity/Berlin", 
    "_to" : "germanCity/Hamburg", 
    "_rev" : "_mWqkqqW--A", 
    "distance" : 400 
  }, 
  { 
    "_key" : "32464", 
    "_id" : "germanHighway/32464", 
    "_from" : "germanCity/Hamburg", 
    "_to" : "germanCity/Cologne", 
    "_rev" : "_mWqkqqa---", 
    "distance" : 500 
  } 
]

[ 
  { 
    "_key" : "32466", 
    "_id" : "frenchHighway/32466", 
    "_from" : "frenchCity/Paris", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_mWqkqqa--_", 
    "distance" : 550 
  } 
]

[ 
  { 
    "_key" : "32468", 
    "_id" : "internationalHighway/32468", 
    "_from" : "germanCity/Berlin", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_mWqkqqa--A", 
    "distance" : 1100 
  }, 
  { 
    "_key" : "32470", 
    "_id" : "internationalHighway/32470", 
    "_from" : "germanCity/Berlin", 
    "_to" : "frenchCity/Paris", 
    "_rev" : "_mWqkqqa--B", 
    "distance" : 1200 
  }, 
  { 
    "_key" : "32472", 
    "_id" : "internationalHighway/32472", 
    "_from" : "germanCity/Hamburg", 
    "_to" : "frenchCity/Paris", 
    "_rev" : "_mWqkqqe---", 
    "distance" : 900 
  }, 
  { 
    "_key" : "32474", 
    "_id" : "internationalHighway/32474", 
    "_from" : "germanCity/Hamburg", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_mWqkqqe--_", 
    "distance" : 1300 
  }, 
  { 
    "_key" : "32476", 
    "_id" : "internationalHighway/32476", 
    "_from" : "germanCity/Cologne", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_mWqkqqe--A", 
    "distance" : 700 
  }, 
  { 
    "_key" : "32478", 
    "_id" : "internationalHighway/32478", 
    "_from" : "germanCity/Cologne", 
    "_to" : "frenchCity/Paris", 
    "_rev" : "_mWqkqqe--B", 
    "distance" : 550 
  } 
]

Connected Components Graph

A small example graph comprised of components (nodes) and connections (edges). Good for trying out graph algorithms such as Weakly Connected Components (WCC).

Three disjoint subgraphs with 36 nodes and edges in total

var examples = require("@arangodb/graph-examples/example-graph");
var g = examples.loadGraph("connectedComponentsGraph");
db.components.toArray();
db.connections.toArray();
examples.dropGraph("connectedComponentsGraph");
Show output
[ 
  { 
    "_key" : "A1", 
    "_id" : "components/A1", 
    "_rev" : "_mWqkqrm---" 
  }, 
  { 
    "_key" : "A2", 
    "_id" : "components/A2", 
    "_rev" : "_mWqkqrm--_" 
  }, 
  { 
    "_key" : "A3", 
    "_id" : "components/A3", 
    "_rev" : "_mWqkqrm--A" 
  }, 
  { 
    "_key" : "A4", 
    "_id" : "components/A4", 
    "_rev" : "_mWqkqrq---" 
  }, 
  { 
    "_key" : "B1", 
    "_id" : "components/B1", 
    "_rev" : "_mWqkqrq--_" 
  }, 
  { 
    "_key" : "B3", 
    "_id" : "components/B3", 
    "_rev" : "_mWqkqrq--A" 
  }, 
  { 
    "_key" : "B2", 
    "_id" : "components/B2", 
    "_rev" : "_mWqkqrq--B" 
  }, 
  { 
    "_key" : "B4", 
    "_id" : "components/B4", 
    "_rev" : "_mWqkqrq--C" 
  }, 
  { 
    "_key" : "B6", 
    "_id" : "components/B6", 
    "_rev" : "_mWqkqru---" 
  }, 
  { 
    "_key" : "B5", 
    "_id" : "components/B5", 
    "_rev" : "_mWqkqru--_" 
  }, 
  { 
    "_key" : "B7", 
    "_id" : "components/B7", 
    "_rev" : "_mWqkqru--A" 
  }, 
  { 
    "_key" : "B8", 
    "_id" : "components/B8", 
    "_rev" : "_mWqkqru--B" 
  }, 
  { 
    "_key" : "B9", 
    "_id" : "components/B9", 
    "_rev" : "_mWqkqru--C" 
  }, 
  { 
    "_key" : "B10", 
    "_id" : "components/B10", 
    "_rev" : "_mWqkqru--D" 
  }, 
  { 
    "_key" : "B19", 
    "_id" : "components/B19", 
    "_rev" : "_mWqkqry---" 
  }, 
  { 
    "_key" : "B11", 
    "_id" : "components/B11", 
    "_rev" : "_mWqkqry--_" 
  }, 
  { 
    "_key" : "B12", 
    "_id" : "components/B12", 
    "_rev" : "_mWqkqry--A" 
  }, 
  { 
    "_key" : "B13", 
    "_id" : "components/B13", 
    "_rev" : "_mWqkqry--B" 
  }, 
  { 
    "_key" : "B20", 
    "_id" : "components/B20", 
    "_rev" : "_mWqkqry--C" 
  }, 
  { 
    "_key" : "B14", 
    "_id" : "components/B14", 
    "_rev" : "_mWqkqr2---" 
  }, 
  { 
    "_key" : "B15", 
    "_id" : "components/B15", 
    "_rev" : "_mWqkqr2--_" 
  }, 
  { 
    "_key" : "B16", 
    "_id" : "components/B16", 
    "_rev" : "_mWqkqr2--A" 
  }, 
  { 
    "_key" : "B17", 
    "_id" : "components/B17", 
    "_rev" : "_mWqkqr2--B" 
  }, 
  { 
    "_key" : "B18", 
    "_id" : "components/B18", 
    "_rev" : "_mWqkqr2--C" 
  }, 
  { 
    "_key" : "B21", 
    "_id" : "components/B21", 
    "_rev" : "_mWqkqr6---" 
  }, 
  { 
    "_key" : "B22", 
    "_id" : "components/B22", 
    "_rev" : "_mWqkqr6--_" 
  }, 
  { 
    "_key" : "C1", 
    "_id" : "components/C1", 
    "_rev" : "_mWqkqr6--A" 
  }, 
  { 
    "_key" : "C2", 
    "_id" : "components/C2", 
    "_rev" : "_mWqkqr6--B" 
  }, 
  { 
    "_key" : "C3", 
    "_id" : "components/C3", 
    "_rev" : "_mWqkqr6--C" 
  }, 
  { 
    "_key" : "C4", 
    "_id" : "components/C4", 
    "_rev" : "_mWqkqs----" 
  }, 
  { 
    "_key" : "C5", 
    "_id" : "components/C5", 
    "_rev" : "_mWqkqs---_" 
  }, 
  { 
    "_key" : "C7", 
    "_id" : "components/C7", 
    "_rev" : "_mWqkqs---A" 
  }, 
  { 
    "_key" : "C6", 
    "_id" : "components/C6", 
    "_rev" : "_mWqkqs---B" 
  }, 
  { 
    "_key" : "C8", 
    "_id" : "components/C8", 
    "_rev" : "_mWqkqs---C" 
  }, 
  { 
    "_key" : "C9", 
    "_id" : "components/C9", 
    "_rev" : "_mWqkqs---D" 
  }, 
  { 
    "_key" : "C10", 
    "_id" : "components/C10", 
    "_rev" : "_mWqkqsC---" 
  } 
]

[ 
  { 
    "_key" : "32602", 
    "_id" : "connections/32602", 
    "_from" : "components/A1", 
    "_to" : "components/A2", 
    "_rev" : "_mWqkqsC--_" 
  }, 
  { 
    "_key" : "32604", 
    "_id" : "connections/32604", 
    "_from" : "components/A2", 
    "_to" : "components/A3", 
    "_rev" : "_mWqkqsC--A" 
  }, 
  { 
    "_key" : "32606", 
    "_id" : "connections/32606", 
    "_from" : "components/A3", 
    "_to" : "components/A4", 
    "_rev" : "_mWqkqsC--B" 
  }, 
  { 
    "_key" : "32608", 
    "_id" : "connections/32608", 
    "_from" : "components/A4", 
    "_to" : "components/A1", 
    "_rev" : "_mWqkqsC--C" 
  }, 
  { 
    "_key" : "32610", 
    "_id" : "connections/32610", 
    "_from" : "components/B1", 
    "_to" : "components/B3", 
    "_rev" : "_mWqkqsG---" 
  }, 
  { 
    "_key" : "32612", 
    "_id" : "connections/32612", 
    "_from" : "components/B2", 
    "_to" : "components/B4", 
    "_rev" : "_mWqkqsG--_" 
  }, 
  { 
    "_key" : "32614", 
    "_id" : "connections/32614", 
    "_from" : "components/B3", 
    "_to" : "components/B6", 
    "_rev" : "_mWqkqsG--A" 
  }, 
  { 
    "_key" : "32616", 
    "_id" : "connections/32616", 
    "_from" : "components/B4", 
    "_to" : "components/B3", 
    "_rev" : "_mWqkqsG--B" 
  }, 
  { 
    "_key" : "32618", 
    "_id" : "connections/32618", 
    "_from" : "components/B4", 
    "_to" : "components/B5", 
    "_rev" : "_mWqkqsK---" 
  }, 
  { 
    "_key" : "32620", 
    "_id" : "connections/32620", 
    "_from" : "components/B6", 
    "_to" : "components/B7", 
    "_rev" : "_mWqkqsK--_" 
  }, 
  { 
    "_key" : "32622", 
    "_id" : "connections/32622", 
    "_from" : "components/B7", 
    "_to" : "components/B8", 
    "_rev" : "_mWqkqsK--A" 
  }, 
  { 
    "_key" : "32624", 
    "_id" : "connections/32624", 
    "_from" : "components/B7", 
    "_to" : "components/B9", 
    "_rev" : "_mWqkqsK--B" 
  }, 
  { 
    "_key" : "32626", 
    "_id" : "connections/32626", 
    "_from" : "components/B7", 
    "_to" : "components/B10", 
    "_rev" : "_mWqkqsK--C" 
  }, 
  { 
    "_key" : "32628", 
    "_id" : "connections/32628", 
    "_from" : "components/B7", 
    "_to" : "components/B19", 
    "_rev" : "_mWqkqsO---" 
  }, 
  { 
    "_key" : "32630", 
    "_id" : "connections/32630", 
    "_from" : "components/B11", 
    "_to" : "components/B10", 
    "_rev" : "_mWqkqsO--_" 
  }, 
  { 
    "_key" : "32632", 
    "_id" : "connections/32632", 
    "_from" : "components/B12", 
    "_to" : "components/B11", 
    "_rev" : "_mWqkqsO--A" 
  }, 
  { 
    "_key" : "32634", 
    "_id" : "connections/32634", 
    "_from" : "components/B13", 
    "_to" : "components/B12", 
    "_rev" : "_mWqkqsO--B" 
  }, 
  { 
    "_key" : "32636", 
    "_id" : "connections/32636", 
    "_from" : "components/B13", 
    "_to" : "components/B20", 
    "_rev" : "_mWqkqsS---" 
  }, 
  { 
    "_key" : "32638", 
    "_id" : "connections/32638", 
    "_from" : "components/B14", 
    "_to" : "components/B13", 
    "_rev" : "_mWqkqsS--_" 
  }, 
  { 
    "_key" : "32640", 
    "_id" : "connections/32640", 
    "_from" : "components/B15", 
    "_to" : "components/B14", 
    "_rev" : "_mWqkqsS--A" 
  }, 
  { 
    "_key" : "32642", 
    "_id" : "connections/32642", 
    "_from" : "components/B15", 
    "_to" : "components/B16", 
    "_rev" : "_mWqkqsS--B" 
  }, 
  { 
    "_key" : "32644", 
    "_id" : "connections/32644", 
    "_from" : "components/B17", 
    "_to" : "components/B15", 
    "_rev" : "_mWqkqsS--C" 
  }, 
  { 
    "_key" : "32646", 
    "_id" : "connections/32646", 
    "_from" : "components/B17", 
    "_to" : "components/B18", 
    "_rev" : "_mWqkqsW---" 
  }, 
  { 
    "_key" : "32648", 
    "_id" : "connections/32648", 
    "_from" : "components/B19", 
    "_to" : "components/B17", 
    "_rev" : "_mWqkqsW--_" 
  }, 
  { 
    "_key" : "32650", 
    "_id" : "connections/32650", 
    "_from" : "components/B20", 
    "_to" : "components/B21", 
    "_rev" : "_mWqkqsW--A" 
  }, 
  { 
    "_key" : "32652", 
    "_id" : "connections/32652", 
    "_from" : "components/B20", 
    "_to" : "components/B22", 
    "_rev" : "_mWqkqsW--B" 
  }, 
  { 
    "_key" : "32654", 
    "_id" : "connections/32654", 
    "_from" : "components/C1", 
    "_to" : "components/C2", 
    "_rev" : "_mWqkqsW--C" 
  }, 
  { 
    "_key" : "32656", 
    "_id" : "connections/32656", 
    "_from" : "components/C2", 
    "_to" : "components/C3", 
    "_rev" : "_mWqkqsa---" 
  }, 
  { 
    "_key" : "32658", 
    "_id" : "connections/32658", 
    "_from" : "components/C3", 
    "_to" : "components/C4", 
    "_rev" : "_mWqkqsa--_" 
  }, 
  { 
    "_key" : "32660", 
    "_id" : "connections/32660", 
    "_from" : "components/C4", 
    "_to" : "components/C5", 
    "_rev" : "_mWqkqsa--A" 
  }, 
  { 
    "_key" : "32662", 
    "_id" : "connections/32662", 
    "_from" : "components/C4", 
    "_to" : "components/C7", 
    "_rev" : "_mWqkqsa--B" 
  }, 
  { 
    "_key" : "32664", 
    "_id" : "connections/32664", 
    "_from" : "components/C5", 
    "_to" : "components/C6", 
    "_rev" : "_mWqkqsa--C" 
  }, 
  { 
    "_key" : "32666", 
    "_id" : "connections/32666", 
    "_from" : "components/C5", 
    "_to" : "components/C7", 
    "_rev" : "_mWqkqsa--D" 
  }, 
  { 
    "_key" : "32668", 
    "_id" : "connections/32668", 
    "_from" : "components/C7", 
    "_to" : "components/C8", 
    "_rev" : "_mWqkqse---" 
  }, 
  { 
    "_key" : "32670", 
    "_id" : "connections/32670", 
    "_from" : "components/C8", 
    "_to" : "components/C9", 
    "_rev" : "_mWqkqse--_" 
  }, 
  { 
    "_key" : "32672", 
    "_id" : "connections/32672", 
    "_from" : "components/C8", 
    "_to" : "components/C10", 
    "_rev" : "_mWqkqse--A" 
  } 
]

Higher volume graph examples

All of the above examples are rather small to make them easy to comprehend and demonstrate how graphs work in ArangoDB. However, there are several, freely available datasets on the web that are a lot bigger.

You can find a collection of datasets with import scripts on GitHub.

Another huge graph is the Pokec social network from Slovakia.

More examples