ArangoDB v3.13 is under development and not released yet. This documentation is not final and potentially incomplete.

Example graphs

How to use the example graphs built into ArangoDB

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" : "_hg5k2sa---", 
    "name" : "Alice" 
  }, 
  { 
    "_key" : "bob", 
    "_id" : "persons/bob", 
    "_rev" : "_hg5k2sa--_", 
    "name" : "Bob" 
  }, 
  { 
    "_key" : "charlie", 
    "_id" : "persons/charlie", 
    "_rev" : "_hg5k2sa--A", 
    "name" : "Charlie" 
  }, 
  { 
    "_key" : "dave", 
    "_id" : "persons/dave", 
    "_rev" : "_hg5k2sa--B", 
    "name" : "Dave" 
  }, 
  { 
    "_key" : "eve", 
    "_id" : "persons/eve", 
    "_rev" : "_hg5k2se---", 
    "name" : "Eve" 
  } 
]

[ 
  { 
    "_key" : "72375", 
    "_id" : "knows/72375", 
    "_from" : "persons/alice", 
    "_to" : "persons/bob", 
    "_rev" : "_hg5k2se--_", 
    "vertex" : "alice" 
  }, 
  { 
    "_key" : "72377", 
    "_id" : "knows/72377", 
    "_from" : "persons/bob", 
    "_to" : "persons/charlie", 
    "_rev" : "_hg5k2se--A", 
    "vertex" : "bob" 
  }, 
  { 
    "_key" : "72379", 
    "_id" : "knows/72379", 
    "_from" : "persons/bob", 
    "_to" : "persons/dave", 
    "_rev" : "_hg5k2se--B", 
    "vertex" : "bob" 
  }, 
  { 
    "_key" : "72381", 
    "_id" : "knows/72381", 
    "_from" : "persons/eve", 
    "_to" : "persons/alice", 
    "_rev" : "_hg5k2se--C", 
    "vertex" : "eve" 
  }, 
  { 
    "_key" : "72383", 
    "_id" : "knows/72383", 
    "_from" : "persons/eve", 
    "_to" : "persons/bob", 
    "_rev" : "_hg5k2se--D", 
    "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" : "_hg5k2vm---", 
    "label" : "1" 
  }, 
  { 
    "_key" : "B", 
    "_id" : "circles/B", 
    "_rev" : "_hg5k2vm--_", 
    "label" : "2" 
  }, 
  { 
    "_key" : "C", 
    "_id" : "circles/C", 
    "_rev" : "_hg5k2vm--A", 
    "label" : "3" 
  }, 
  { 
    "_key" : "D", 
    "_id" : "circles/D", 
    "_rev" : "_hg5k2vq---", 
    "label" : "4" 
  }, 
  { 
    "_key" : "E", 
    "_id" : "circles/E", 
    "_rev" : "_hg5k2vq--_", 
    "label" : "5" 
  }, 
  { 
    "_key" : "F", 
    "_id" : "circles/F", 
    "_rev" : "_hg5k2vq--A", 
    "label" : "6" 
  }, 
  { 
    "_key" : "G", 
    "_id" : "circles/G", 
    "_rev" : "_hg5k2vq--B", 
    "label" : "7" 
  }, 
  { 
    "_key" : "H", 
    "_id" : "circles/H", 
    "_rev" : "_hg5k2vq--C", 
    "label" : "8" 
  }, 
  { 
    "_key" : "I", 
    "_id" : "circles/I", 
    "_rev" : "_hg5k2vq--D", 
    "label" : "9" 
  }, 
  { 
    "_key" : "J", 
    "_id" : "circles/J", 
    "_rev" : "_hg5k2vu---", 
    "label" : "10" 
  }, 
  { 
    "_key" : "K", 
    "_id" : "circles/K", 
    "_rev" : "_hg5k2vu--_", 
    "label" : "11" 
  } 
]

[ 
  { 
    "_key" : "72483", 
    "_id" : "edges/72483", 
    "_from" : "circles/A", 
    "_to" : "circles/B", 
    "_rev" : "_hg5k2vu--A", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_bar" 
  }, 
  { 
    "_key" : "72485", 
    "_id" : "edges/72485", 
    "_from" : "circles/B", 
    "_to" : "circles/C", 
    "_rev" : "_hg5k2vu--B", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_blarg" 
  }, 
  { 
    "_key" : "72487", 
    "_id" : "edges/72487", 
    "_from" : "circles/C", 
    "_to" : "circles/D", 
    "_rev" : "_hg5k2vu--C", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_blorg" 
  }, 
  { 
    "_key" : "72489", 
    "_id" : "edges/72489", 
    "_from" : "circles/B", 
    "_to" : "circles/E", 
    "_rev" : "_hg5k2vy---", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_blub" 
  }, 
  { 
    "_key" : "72491", 
    "_id" : "edges/72491", 
    "_from" : "circles/E", 
    "_to" : "circles/F", 
    "_rev" : "_hg5k2vy--_", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "left_schubi" 
  }, 
  { 
    "_key" : "72493", 
    "_id" : "edges/72493", 
    "_from" : "circles/A", 
    "_to" : "circles/G", 
    "_rev" : "_hg5k2vy--A", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_foo" 
  }, 
  { 
    "_key" : "72495", 
    "_id" : "edges/72495", 
    "_from" : "circles/G", 
    "_to" : "circles/H", 
    "_rev" : "_hg5k2vy--B", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_blob" 
  }, 
  { 
    "_key" : "72497", 
    "_id" : "edges/72497", 
    "_from" : "circles/H", 
    "_to" : "circles/I", 
    "_rev" : "_hg5k2v2---", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_blub" 
  }, 
  { 
    "_key" : "72499", 
    "_id" : "edges/72499", 
    "_from" : "circles/G", 
    "_to" : "circles/J", 
    "_rev" : "_hg5k2v2--_", 
    "theFalse" : false, 
    "theTruth" : true, 
    "label" : "right_zip" 
  }, 
  { 
    "_key" : "72501", 
    "_id" : "edges/72501", 
    "_from" : "circles/J", 
    "_to" : "circles/K", 
    "_rev" : "_hg5k2v2--A", 
    "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" : "_hg5k3Ea---", 
    "label" : "Inverness" 
  }, 
  { 
    "_key" : "Aberdeen", 
    "_id" : "places/Aberdeen", 
    "_rev" : "_hg5k3Ea--_", 
    "label" : "Aberdeen" 
  }, 
  { 
    "_key" : "Leuchars", 
    "_id" : "places/Leuchars", 
    "_rev" : "_hg5k3Ea--A", 
    "label" : "Leuchars" 
  }, 
  { 
    "_key" : "StAndrews", 
    "_id" : "places/StAndrews", 
    "_rev" : "_hg5k3Ee---", 
    "label" : "StAndrews" 
  }, 
  { 
    "_key" : "Edinburgh", 
    "_id" : "places/Edinburgh", 
    "_rev" : "_hg5k3Ee--_", 
    "label" : "Edinburgh" 
  }, 
  { 
    "_key" : "Glasgow", 
    "_id" : "places/Glasgow", 
    "_rev" : "_hg5k3Ee--A", 
    "label" : "Glasgow" 
  }, 
  { 
    "_key" : "York", 
    "_id" : "places/York", 
    "_rev" : "_hg5k3Ee--B", 
    "label" : "York" 
  }, 
  { 
    "_key" : "Carlisle", 
    "_id" : "places/Carlisle", 
    "_rev" : "_hg5k3Ee--C", 
    "label" : "Carlisle" 
  }, 
  { 
    "_key" : "Birmingham", 
    "_id" : "places/Birmingham", 
    "_rev" : "_hg5k3Ee--D", 
    "label" : "Birmingham" 
  }, 
  { 
    "_key" : "London", 
    "_id" : "places/London", 
    "_rev" : "_hg5k3Ee--E", 
    "label" : "London" 
  }, 
  { 
    "_key" : "Brussels", 
    "_id" : "places/Brussels", 
    "_rev" : "_hg5k3Ee--F", 
    "label" : "Brussels" 
  }, 
  { 
    "_key" : "Cologne", 
    "_id" : "places/Cologne", 
    "_rev" : "_hg5k3Ei---", 
    "label" : "Cologne" 
  }, 
  { 
    "_key" : "Toronto", 
    "_id" : "places/Toronto", 
    "_rev" : "_hg5k3Ei--_", 
    "label" : "Toronto" 
  }, 
  { 
    "_key" : "Winnipeg", 
    "_id" : "places/Winnipeg", 
    "_rev" : "_hg5k3Ei--A", 
    "label" : "Winnipeg" 
  }, 
  { 
    "_key" : "Saskatoon", 
    "_id" : "places/Saskatoon", 
    "_rev" : "_hg5k3Ei--B", 
    "label" : "Saskatoon" 
  }, 
  { 
    "_key" : "Edmonton", 
    "_id" : "places/Edmonton", 
    "_rev" : "_hg5k3Ei--C", 
    "label" : "Edmonton" 
  }, 
  { 
    "_key" : "Jasper", 
    "_id" : "places/Jasper", 
    "_rev" : "_hg5k3Ei--D", 
    "label" : "Jasper" 
  }, 
  { 
    "_key" : "Vancouver", 
    "_id" : "places/Vancouver", 
    "_rev" : "_hg5k3Ei--E", 
    "label" : "Vancouver" 
  } 
]

[ 
  { 
    "_key" : "72588", 
    "_id" : "connections/72588", 
    "_from" : "places/Inverness", 
    "_to" : "places/Aberdeen", 
    "_rev" : "_hg5k3Em---", 
    "travelTime" : 3 
  }, 
  { 
    "_key" : "72590", 
    "_id" : "connections/72590", 
    "_from" : "places/Aberdeen", 
    "_to" : "places/Inverness", 
    "_rev" : "_hg5k3Em--_", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "72592", 
    "_id" : "connections/72592", 
    "_from" : "places/Aberdeen", 
    "_to" : "places/Leuchars", 
    "_rev" : "_hg5k3Em--A", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "72594", 
    "_id" : "connections/72594", 
    "_from" : "places/Leuchars", 
    "_to" : "places/Aberdeen", 
    "_rev" : "_hg5k3Em--B", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "72596", 
    "_id" : "connections/72596", 
    "_from" : "places/Leuchars", 
    "_to" : "places/Edinburgh", 
    "_rev" : "_hg5k3Em--C", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "72598", 
    "_id" : "connections/72598", 
    "_from" : "places/Edinburgh", 
    "_to" : "places/Leuchars", 
    "_rev" : "_hg5k3Eq---", 
    "travelTime" : 3 
  }, 
  { 
    "_key" : "72600", 
    "_id" : "connections/72600", 
    "_from" : "places/Edinburgh", 
    "_to" : "places/Glasgow", 
    "_rev" : "_hg5k3Eq--_", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "72602", 
    "_id" : "connections/72602", 
    "_from" : "places/Glasgow", 
    "_to" : "places/Edinburgh", 
    "_rev" : "_hg5k3Eq--A", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "72604", 
    "_id" : "connections/72604", 
    "_from" : "places/Edinburgh", 
    "_to" : "places/York", 
    "_rev" : "_hg5k3Eq--B", 
    "travelTime" : 3.5 
  }, 
  { 
    "_key" : "72606", 
    "_id" : "connections/72606", 
    "_from" : "places/York", 
    "_to" : "places/Edinburgh", 
    "_rev" : "_hg5k3Eu---", 
    "travelTime" : 4 
  }, 
  { 
    "_key" : "72608", 
    "_id" : "connections/72608", 
    "_from" : "places/Glasgow", 
    "_to" : "places/Carlisle", 
    "_rev" : "_hg5k3Eu--_", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "72610", 
    "_id" : "connections/72610", 
    "_from" : "places/Carlisle", 
    "_to" : "places/Glasgow", 
    "_rev" : "_hg5k3Eu--A", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "72612", 
    "_id" : "connections/72612", 
    "_from" : "places/Carlisle", 
    "_to" : "places/York", 
    "_rev" : "_hg5k3Eu--B", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "72614", 
    "_id" : "connections/72614", 
    "_from" : "places/York", 
    "_to" : "places/Carlisle", 
    "_rev" : "_hg5k3Eu--C", 
    "travelTime" : 3.5 
  }, 
  { 
    "_key" : "72616", 
    "_id" : "connections/72616", 
    "_from" : "places/Carlisle", 
    "_to" : "places/Birmingham", 
    "_rev" : "_hg5k3Ey---", 
    "travelTime" : 2 
  }, 
  { 
    "_key" : "72618", 
    "_id" : "connections/72618", 
    "_from" : "places/Birmingham", 
    "_to" : "places/Carlisle", 
    "_rev" : "_hg5k3Ey--_", 
    "travelTime" : 1 
  }, 
  { 
    "_key" : "72620", 
    "_id" : "connections/72620", 
    "_from" : "places/Birmingham", 
    "_to" : "places/London", 
    "_rev" : "_hg5k3Ey--A", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "72622", 
    "_id" : "connections/72622", 
    "_from" : "places/London", 
    "_to" : "places/Birmingham", 
    "_rev" : "_hg5k3Ey--B", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "72624", 
    "_id" : "connections/72624", 
    "_from" : "places/Leuchars", 
    "_to" : "places/StAndrews", 
    "_rev" : "_hg5k3Ey--C", 
    "travelTime" : 0.2 
  }, 
  { 
    "_key" : "72626", 
    "_id" : "connections/72626", 
    "_from" : "places/StAndrews", 
    "_to" : "places/Leuchars", 
    "_rev" : "_hg5k3E2---", 
    "travelTime" : 0.2 
  }, 
  { 
    "_key" : "72628", 
    "_id" : "connections/72628", 
    "_from" : "places/York", 
    "_to" : "places/London", 
    "_rev" : "_hg5k3E2--_", 
    "travelTime" : 1.8 
  }, 
  { 
    "_key" : "72630", 
    "_id" : "connections/72630", 
    "_from" : "places/London", 
    "_to" : "places/York", 
    "_rev" : "_hg5k3E2--A", 
    "travelTime" : 2 
  }, 
  { 
    "_key" : "72632", 
    "_id" : "connections/72632", 
    "_from" : "places/London", 
    "_to" : "places/Brussels", 
    "_rev" : "_hg5k3E2--B", 
    "travelTime" : 2.5 
  }, 
  { 
    "_key" : "72634", 
    "_id" : "connections/72634", 
    "_from" : "places/Brussels", 
    "_to" : "places/London", 
    "_rev" : "_hg5k3E2--C", 
    "travelTime" : 3.5 
  }, 
  { 
    "_key" : "72636", 
    "_id" : "connections/72636", 
    "_from" : "places/Brussels", 
    "_to" : "places/Cologne", 
    "_rev" : "_hg5k3E6---", 
    "travelTime" : 2 
  }, 
  { 
    "_key" : "72638", 
    "_id" : "connections/72638", 
    "_from" : "places/Cologne", 
    "_to" : "places/Brussels", 
    "_rev" : "_hg5k3E6--_", 
    "travelTime" : 1.5 
  }, 
  { 
    "_key" : "72640", 
    "_id" : "connections/72640", 
    "_from" : "places/Toronto", 
    "_to" : "places/Winnipeg", 
    "_rev" : "_hg5k3E6--A", 
    "travelTime" : 36 
  }, 
  { 
    "_key" : "72642", 
    "_id" : "connections/72642", 
    "_from" : "places/Winnipeg", 
    "_to" : "places/Toronto", 
    "_rev" : "_hg5k3E6--B", 
    "travelTime" : 35 
  }, 
  { 
    "_key" : "72644", 
    "_id" : "connections/72644", 
    "_from" : "places/Winnipeg", 
    "_to" : "places/Saskatoon", 
    "_rev" : "_hg5k3F----", 
    "travelTime" : 12 
  }, 
  { 
    "_key" : "72646", 
    "_id" : "connections/72646", 
    "_from" : "places/Saskatoon", 
    "_to" : "places/Winnipeg", 
    "_rev" : "_hg5k3F---_", 
    "travelTime" : 5 
  }, 
  { 
    "_key" : "72648", 
    "_id" : "connections/72648", 
    "_from" : "places/Saskatoon", 
    "_to" : "places/Edmonton", 
    "_rev" : "_hg5k3F---A", 
    "travelTime" : 12 
  }, 
  { 
    "_key" : "72650", 
    "_id" : "connections/72650", 
    "_from" : "places/Edmonton", 
    "_to" : "places/Saskatoon", 
    "_rev" : "_hg5k3F---B", 
    "travelTime" : 17 
  }, 
  { 
    "_key" : "72652", 
    "_id" : "connections/72652", 
    "_from" : "places/Edmonton", 
    "_to" : "places/Jasper", 
    "_rev" : "_hg5k3F---C", 
    "travelTime" : 6 
  }, 
  { 
    "_key" : "72654", 
    "_id" : "connections/72654", 
    "_from" : "places/Jasper", 
    "_to" : "places/Edmonton", 
    "_rev" : "_hg5k3F---D", 
    "travelTime" : 5 
  }, 
  { 
    "_key" : "72656", 
    "_id" : "connections/72656", 
    "_from" : "places/Jasper", 
    "_to" : "places/Vancouver", 
    "_rev" : "_hg5k3FC---", 
    "travelTime" : 12 
  }, 
  { 
    "_key" : "72658", 
    "_id" : "connections/72658", 
    "_from" : "places/Vancouver", 
    "_to" : "places/Jasper", 
    "_rev" : "_hg5k3FC--_", 
    "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" : "_hg5k3lS---" 
  }, 
  { 
    "_key" : "B", 
    "_id" : "mps_verts/B", 
    "_rev" : "_hg5k3lS--_" 
  }, 
  { 
    "_key" : "C", 
    "_id" : "mps_verts/C", 
    "_rev" : "_hg5k3lS--A" 
  }, 
  { 
    "_key" : "D", 
    "_id" : "mps_verts/D", 
    "_rev" : "_hg5k3lW---" 
  }, 
  { 
    "_key" : "E", 
    "_id" : "mps_verts/E", 
    "_rev" : "_hg5k3lW--_" 
  }, 
  { 
    "_key" : "F", 
    "_id" : "mps_verts/F", 
    "_rev" : "_hg5k3la---" 
  } 
]

[ 
  { 
    "_key" : "72756", 
    "_id" : "mps_edges/72756", 
    "_from" : "mps_verts/A", 
    "_to" : "mps_verts/B", 
    "_rev" : "_hg5k3la--_", 
    "vertex" : "A" 
  }, 
  { 
    "_key" : "72758", 
    "_id" : "mps_edges/72758", 
    "_from" : "mps_verts/A", 
    "_to" : "mps_verts/E", 
    "_rev" : "_hg5k3la--A", 
    "vertex" : "A" 
  }, 
  { 
    "_key" : "72760", 
    "_id" : "mps_edges/72760", 
    "_from" : "mps_verts/A", 
    "_to" : "mps_verts/D", 
    "_rev" : "_hg5k3le---", 
    "vertex" : "A" 
  }, 
  { 
    "_key" : "72762", 
    "_id" : "mps_edges/72762", 
    "_from" : "mps_verts/B", 
    "_to" : "mps_verts/C", 
    "_rev" : "_hg5k3le--_", 
    "vertex" : "B" 
  }, 
  { 
    "_key" : "72764", 
    "_id" : "mps_edges/72764", 
    "_from" : "mps_verts/D", 
    "_to" : "mps_verts/C", 
    "_rev" : "_hg5k3le--A", 
    "vertex" : "D" 
  }, 
  { 
    "_key" : "72766", 
    "_id" : "mps_edges/72766", 
    "_from" : "mps_verts/E", 
    "_to" : "mps_verts/F", 
    "_rev" : "_hg5k3li---", 
    "vertex" : "E" 
  }, 
  { 
    "_key" : "72768", 
    "_id" : "mps_edges/72768", 
    "_from" : "mps_verts/F", 
    "_to" : "mps_verts/C", 
    "_rev" : "_hg5k3li--_", 
    "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" : "_hg5k31m---", 
    "name" : "World", 
    "type" : "root" 
  }, 
  { 
    "_key" : "continent-africa", 
    "_id" : "worldVertices/continent-africa", 
    "_rev" : "_hg5k31m--_", 
    "name" : "Africa", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-asia", 
    "_id" : "worldVertices/continent-asia", 
    "_rev" : "_hg5k31m--A", 
    "name" : "Asia", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-australia", 
    "_id" : "worldVertices/continent-australia", 
    "_rev" : "_hg5k31m--B", 
    "name" : "Australia", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-europe", 
    "_id" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k31q---", 
    "name" : "Europe", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-north-america", 
    "_id" : "worldVertices/continent-north-america", 
    "_rev" : "_hg5k31q--_", 
    "name" : "North America", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "continent-south-america", 
    "_id" : "worldVertices/continent-south-america", 
    "_rev" : "_hg5k31q--A", 
    "name" : "South America", 
    "type" : "continent" 
  }, 
  { 
    "_key" : "country-afghanistan", 
    "_id" : "worldVertices/country-afghanistan", 
    "_rev" : "_hg5k31q--B", 
    "name" : "Afghanistan", 
    "type" : "country", 
    "code" : "AFG" 
  }, 
  { 
    "_key" : "country-albania", 
    "_id" : "worldVertices/country-albania", 
    "_rev" : "_hg5k31q--C", 
    "name" : "Albania", 
    "type" : "country", 
    "code" : "ALB" 
  }, 
  { 
    "_key" : "country-algeria", 
    "_id" : "worldVertices/country-algeria", 
    "_rev" : "_hg5k31q--D", 
    "name" : "Algeria", 
    "type" : "country", 
    "code" : "DZA" 
  }, 
  { 
    "_key" : "country-andorra", 
    "_id" : "worldVertices/country-andorra", 
    "_rev" : "_hg5k31u---", 
    "name" : "Andorra", 
    "type" : "country", 
    "code" : "AND" 
  }, 
  { 
    "_key" : "country-angola", 
    "_id" : "worldVertices/country-angola", 
    "_rev" : "_hg5k31u--_", 
    "name" : "Angola", 
    "type" : "country", 
    "code" : "AGO" 
  }, 
  { 
    "_key" : "country-antigua-and-barbuda", 
    "_id" : "worldVertices/country-antigua-and-barbuda", 
    "_rev" : "_hg5k31u--A", 
    "name" : "Antigua and Barbuda", 
    "type" : "country", 
    "code" : "ATG" 
  }, 
  { 
    "_key" : "country-argentina", 
    "_id" : "worldVertices/country-argentina", 
    "_rev" : "_hg5k31u--B", 
    "name" : "Argentina", 
    "type" : "country", 
    "code" : "ARG" 
  }, 
  { 
    "_key" : "country-australia", 
    "_id" : "worldVertices/country-australia", 
    "_rev" : "_hg5k31u--C", 
    "name" : "Australia", 
    "type" : "country", 
    "code" : "AUS" 
  }, 
  { 
    "_key" : "country-austria", 
    "_id" : "worldVertices/country-austria", 
    "_rev" : "_hg5k31u--D", 
    "name" : "Austria", 
    "type" : "country", 
    "code" : "AUT" 
  }, 
  { 
    "_key" : "country-bahamas", 
    "_id" : "worldVertices/country-bahamas", 
    "_rev" : "_hg5k31y---", 
    "name" : "Bahamas", 
    "type" : "country", 
    "code" : "BHS" 
  }, 
  { 
    "_key" : "country-bahrain", 
    "_id" : "worldVertices/country-bahrain", 
    "_rev" : "_hg5k31y--_", 
    "name" : "Bahrain", 
    "type" : "country", 
    "code" : "BHR" 
  }, 
  { 
    "_key" : "country-bangladesh", 
    "_id" : "worldVertices/country-bangladesh", 
    "_rev" : "_hg5k31y--A", 
    "name" : "Bangladesh", 
    "type" : "country", 
    "code" : "BGD" 
  }, 
  { 
    "_key" : "country-barbados", 
    "_id" : "worldVertices/country-barbados", 
    "_rev" : "_hg5k31y--B", 
    "name" : "Barbados", 
    "type" : "country", 
    "code" : "BRB" 
  }, 
  { 
    "_key" : "country-belgium", 
    "_id" : "worldVertices/country-belgium", 
    "_rev" : "_hg5k31y--C", 
    "name" : "Belgium", 
    "type" : "country", 
    "code" : "BEL" 
  }, 
  { 
    "_key" : "country-bhutan", 
    "_id" : "worldVertices/country-bhutan", 
    "_rev" : "_hg5k31y--D", 
    "name" : "Bhutan", 
    "type" : "country", 
    "code" : "BTN" 
  }, 
  { 
    "_key" : "country-bolivia", 
    "_id" : "worldVertices/country-bolivia", 
    "_rev" : "_hg5k312---", 
    "name" : "Bolivia", 
    "type" : "country", 
    "code" : "BOL" 
  }, 
  { 
    "_key" : "country-bosnia-and-herzegovina", 
    "_id" : "worldVertices/country-bosnia-and-herzegovina", 
    "_rev" : "_hg5k312--_", 
    "name" : "Bosnia and Herzegovina", 
    "type" : "country", 
    "code" : "BIH" 
  }, 
  { 
    "_key" : "country-botswana", 
    "_id" : "worldVertices/country-botswana", 
    "_rev" : "_hg5k312--A", 
    "name" : "Botswana", 
    "type" : "country", 
    "code" : "BWA" 
  }, 
  { 
    "_key" : "country-brazil", 
    "_id" : "worldVertices/country-brazil", 
    "_rev" : "_hg5k312--B", 
    "name" : "Brazil", 
    "type" : "country", 
    "code" : "BRA" 
  }, 
  { 
    "_key" : "country-brunei", 
    "_id" : "worldVertices/country-brunei", 
    "_rev" : "_hg5k312--C", 
    "name" : "Brunei", 
    "type" : "country", 
    "code" : "BRN" 
  }, 
  { 
    "_key" : "country-bulgaria", 
    "_id" : "worldVertices/country-bulgaria", 
    "_rev" : "_hg5k316---", 
    "name" : "Bulgaria", 
    "type" : "country", 
    "code" : "BGR" 
  }, 
  { 
    "_key" : "country-burkina-faso", 
    "_id" : "worldVertices/country-burkina-faso", 
    "_rev" : "_hg5k316--_", 
    "name" : "Burkina Faso", 
    "type" : "country", 
    "code" : "BFA" 
  }, 
  { 
    "_key" : "country-burundi", 
    "_id" : "worldVertices/country-burundi", 
    "_rev" : "_hg5k316--A", 
    "name" : "Burundi", 
    "type" : "country", 
    "code" : "BDI" 
  }, 
  { 
    "_key" : "country-cambodia", 
    "_id" : "worldVertices/country-cambodia", 
    "_rev" : "_hg5k316--B", 
    "name" : "Cambodia", 
    "type" : "country", 
    "code" : "KHM" 
  }, 
  { 
    "_key" : "country-cameroon", 
    "_id" : "worldVertices/country-cameroon", 
    "_rev" : "_hg5k316--C", 
    "name" : "Cameroon", 
    "type" : "country", 
    "code" : "CMR" 
  }, 
  { 
    "_key" : "country-canada", 
    "_id" : "worldVertices/country-canada", 
    "_rev" : "_hg5k316--D", 
    "name" : "Canada", 
    "type" : "country", 
    "code" : "CAN" 
  }, 
  { 
    "_key" : "country-chad", 
    "_id" : "worldVertices/country-chad", 
    "_rev" : "_hg5k316--E", 
    "name" : "Chad", 
    "type" : "country", 
    "code" : "TCD" 
  }, 
  { 
    "_key" : "country-chile", 
    "_id" : "worldVertices/country-chile", 
    "_rev" : "_hg5k32----", 
    "name" : "Chile", 
    "type" : "country", 
    "code" : "CHL" 
  }, 
  { 
    "_key" : "country-colombia", 
    "_id" : "worldVertices/country-colombia", 
    "_rev" : "_hg5k32---_", 
    "name" : "Colombia", 
    "type" : "country", 
    "code" : "COL" 
  }, 
  { 
    "_key" : "country-cote-d-ivoire", 
    "_id" : "worldVertices/country-cote-d-ivoire", 
    "_rev" : "_hg5k32---A", 
    "name" : "Cote d'Ivoire", 
    "type" : "country", 
    "code" : "CIV" 
  }, 
  { 
    "_key" : "country-croatia", 
    "_id" : "worldVertices/country-croatia", 
    "_rev" : "_hg5k32---B", 
    "name" : "Croatia", 
    "type" : "country", 
    "code" : "HRV" 
  }, 
  { 
    "_key" : "country-czech-republic", 
    "_id" : "worldVertices/country-czech-republic", 
    "_rev" : "_hg5k32---C", 
    "name" : "Czech Republic", 
    "type" : "country", 
    "code" : "CZE" 
  }, 
  { 
    "_key" : "country-denmark", 
    "_id" : "worldVertices/country-denmark", 
    "_rev" : "_hg5k32---D", 
    "name" : "Denmark", 
    "type" : "country", 
    "code" : "DNK" 
  }, 
  { 
    "_key" : "country-ecuador", 
    "_id" : "worldVertices/country-ecuador", 
    "_rev" : "_hg5k32C---", 
    "name" : "Ecuador", 
    "type" : "country", 
    "code" : "ECU" 
  }, 
  { 
    "_key" : "country-egypt", 
    "_id" : "worldVertices/country-egypt", 
    "_rev" : "_hg5k32C--_", 
    "name" : "Egypt", 
    "type" : "country", 
    "code" : "EGY" 
  }, 
  { 
    "_key" : "country-eritrea", 
    "_id" : "worldVertices/country-eritrea", 
    "_rev" : "_hg5k32C--A", 
    "name" : "Eritrea", 
    "type" : "country", 
    "code" : "ERI" 
  }, 
  { 
    "_key" : "country-finland", 
    "_id" : "worldVertices/country-finland", 
    "_rev" : "_hg5k32C--B", 
    "name" : "Finland", 
    "type" : "country", 
    "code" : "FIN" 
  }, 
  { 
    "_key" : "country-france", 
    "_id" : "worldVertices/country-france", 
    "_rev" : "_hg5k32C--C", 
    "name" : "France", 
    "type" : "country", 
    "code" : "FRA" 
  }, 
  { 
    "_key" : "country-germany", 
    "_id" : "worldVertices/country-germany", 
    "_rev" : "_hg5k32C--D", 
    "name" : "Germany", 
    "type" : "country", 
    "code" : "DEU" 
  }, 
  { 
    "_key" : "country-people-s-republic-of-china", 
    "_id" : "worldVertices/country-people-s-republic-of-china", 
    "_rev" : "_hg5k32K---", 
    "name" : "People's Republic of China", 
    "type" : "country", 
    "code" : "CHN" 
  }, 
  { 
    "_key" : "capital-algiers", 
    "_id" : "worldVertices/capital-algiers", 
    "_rev" : "_hg5k32K--_", 
    "name" : "Algiers", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-andorra-la-vella", 
    "_id" : "worldVertices/capital-andorra-la-vella", 
    "_rev" : "_hg5k32K--A", 
    "name" : "Andorra la Vella", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-asmara", 
    "_id" : "worldVertices/capital-asmara", 
    "_rev" : "_hg5k32K--B", 
    "name" : "Asmara", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bandar-seri-begawan", 
    "_id" : "worldVertices/capital-bandar-seri-begawan", 
    "_rev" : "_hg5k32K--C", 
    "name" : "Bandar Seri Begawan", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-beijing", 
    "_id" : "worldVertices/capital-beijing", 
    "_rev" : "_hg5k32O---", 
    "name" : "Beijing", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-berlin", 
    "_id" : "worldVertices/capital-berlin", 
    "_rev" : "_hg5k32O--_", 
    "name" : "Berlin", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bogota", 
    "_id" : "worldVertices/capital-bogota", 
    "_rev" : "_hg5k32O--A", 
    "name" : "Bogota", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-brasilia", 
    "_id" : "worldVertices/capital-brasilia", 
    "_rev" : "_hg5k32S---", 
    "name" : "Brasilia", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bridgetown", 
    "_id" : "worldVertices/capital-bridgetown", 
    "_rev" : "_hg5k32S--_", 
    "name" : "Bridgetown", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-brussels", 
    "_id" : "worldVertices/capital-brussels", 
    "_rev" : "_hg5k32W---", 
    "name" : "Brussels", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-buenos-aires", 
    "_id" : "worldVertices/capital-buenos-aires", 
    "_rev" : "_hg5k32W--_", 
    "name" : "Buenos Aires", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-bujumbura", 
    "_id" : "worldVertices/capital-bujumbura", 
    "_rev" : "_hg5k32W--A", 
    "name" : "Bujumbura", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-cairo", 
    "_id" : "worldVertices/capital-cairo", 
    "_rev" : "_hg5k32W--B", 
    "name" : "Cairo", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-canberra", 
    "_id" : "worldVertices/capital-canberra", 
    "_rev" : "_hg5k32W--C", 
    "name" : "Canberra", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-copenhagen", 
    "_id" : "worldVertices/capital-copenhagen", 
    "_rev" : "_hg5k32a---", 
    "name" : "Copenhagen", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-dhaka", 
    "_id" : "worldVertices/capital-dhaka", 
    "_rev" : "_hg5k32a--_", 
    "name" : "Dhaka", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-gaborone", 
    "_id" : "worldVertices/capital-gaborone", 
    "_rev" : "_hg5k32a--A", 
    "name" : "Gaborone", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-helsinki", 
    "_id" : "worldVertices/capital-helsinki", 
    "_rev" : "_hg5k32a--B", 
    "name" : "Helsinki", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-kabul", 
    "_id" : "worldVertices/capital-kabul", 
    "_rev" : "_hg5k32a--C", 
    "name" : "Kabul", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-la-paz", 
    "_id" : "worldVertices/capital-la-paz", 
    "_rev" : "_hg5k32a--D", 
    "name" : "La Paz", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-luanda", 
    "_id" : "worldVertices/capital-luanda", 
    "_rev" : "_hg5k32e---", 
    "name" : "Luanda", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-manama", 
    "_id" : "worldVertices/capital-manama", 
    "_rev" : "_hg5k32e--_", 
    "name" : "Manama", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-nassau", 
    "_id" : "worldVertices/capital-nassau", 
    "_rev" : "_hg5k32e--A", 
    "name" : "Nassau", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-n-djamena", 
    "_id" : "worldVertices/capital-n-djamena", 
    "_rev" : "_hg5k32e--B", 
    "name" : "N'Djamena", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-ottawa", 
    "_id" : "worldVertices/capital-ottawa", 
    "_rev" : "_hg5k32e--C", 
    "name" : "Ottawa", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-ouagadougou", 
    "_id" : "worldVertices/capital-ouagadougou", 
    "_rev" : "_hg5k32e--D", 
    "name" : "Ouagadougou", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-paris", 
    "_id" : "worldVertices/capital-paris", 
    "_rev" : "_hg5k32i---", 
    "name" : "Paris", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-phnom-penh", 
    "_id" : "worldVertices/capital-phnom-penh", 
    "_rev" : "_hg5k32i--_", 
    "name" : "Phnom Penh", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-prague", 
    "_id" : "worldVertices/capital-prague", 
    "_rev" : "_hg5k32i--A", 
    "name" : "Prague", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-quito", 
    "_id" : "worldVertices/capital-quito", 
    "_rev" : "_hg5k32i--B", 
    "name" : "Quito", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-saint-john-s", 
    "_id" : "worldVertices/capital-saint-john-s", 
    "_rev" : "_hg5k32i--C", 
    "name" : "Saint John's", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-santiago", 
    "_id" : "worldVertices/capital-santiago", 
    "_rev" : "_hg5k32i--D", 
    "name" : "Santiago", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-sarajevo", 
    "_id" : "worldVertices/capital-sarajevo", 
    "_rev" : "_hg5k32i--E", 
    "name" : "Sarajevo", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-sofia", 
    "_id" : "worldVertices/capital-sofia", 
    "_rev" : "_hg5k32m---", 
    "name" : "Sofia", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-thimphu", 
    "_id" : "worldVertices/capital-thimphu", 
    "_rev" : "_hg5k32m--_", 
    "name" : "Thimphu", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-tirana", 
    "_id" : "worldVertices/capital-tirana", 
    "_rev" : "_hg5k32m--A", 
    "name" : "Tirana", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-vienna", 
    "_id" : "worldVertices/capital-vienna", 
    "_rev" : "_hg5k32m--B", 
    "name" : "Vienna", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-yamoussoukro", 
    "_id" : "worldVertices/capital-yamoussoukro", 
    "_rev" : "_hg5k32m--C", 
    "name" : "Yamoussoukro", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-yaounde", 
    "_id" : "worldVertices/capital-yaounde", 
    "_rev" : "_hg5k32m--D", 
    "name" : "Yaounde", 
    "type" : "capital" 
  }, 
  { 
    "_key" : "capital-zagreb", 
    "_id" : "worldVertices/capital-zagreb", 
    "_rev" : "_hg5k32m--E", 
    "name" : "Zagreb", 
    "type" : "capital" 
  } 
]

[ 
  { 
    "_key" : "72940", 
    "_id" : "worldEdges/72940", 
    "_from" : "worldVertices/continent-africa", 
    "_to" : "worldVertices/world", 
    "_rev" : "_hg5k32q---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72942", 
    "_id" : "worldEdges/72942", 
    "_from" : "worldVertices/continent-asia", 
    "_to" : "worldVertices/world", 
    "_rev" : "_hg5k32q--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72944", 
    "_id" : "worldEdges/72944", 
    "_from" : "worldVertices/continent-australia", 
    "_to" : "worldVertices/world", 
    "_rev" : "_hg5k32q--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72946", 
    "_id" : "worldEdges/72946", 
    "_from" : "worldVertices/continent-europe", 
    "_to" : "worldVertices/world", 
    "_rev" : "_hg5k32q--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72948", 
    "_id" : "worldEdges/72948", 
    "_from" : "worldVertices/continent-north-america", 
    "_to" : "worldVertices/world", 
    "_rev" : "_hg5k32q--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72950", 
    "_id" : "worldEdges/72950", 
    "_from" : "worldVertices/continent-south-america", 
    "_to" : "worldVertices/world", 
    "_rev" : "_hg5k32q--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72952", 
    "_id" : "worldEdges/72952", 
    "_from" : "worldVertices/country-afghanistan", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_hg5k32u---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72954", 
    "_id" : "worldEdges/72954", 
    "_from" : "worldVertices/country-albania", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k32u--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72956", 
    "_id" : "worldEdges/72956", 
    "_from" : "worldVertices/country-algeria", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_hg5k32u--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72958", 
    "_id" : "worldEdges/72958", 
    "_from" : "worldVertices/country-andorra", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k32u--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72960", 
    "_id" : "worldEdges/72960", 
    "_from" : "worldVertices/country-angola", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_hg5k32u--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72962", 
    "_id" : "worldEdges/72962", 
    "_from" : "worldVertices/country-antigua-and-barbuda", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_hg5k32y---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72964", 
    "_id" : "worldEdges/72964", 
    "_from" : "worldVertices/country-argentina", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_hg5k32y--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72966", 
    "_id" : "worldEdges/72966", 
    "_from" : "worldVertices/country-australia", 
    "_to" : "worldVertices/continent-australia", 
    "_rev" : "_hg5k32y--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72968", 
    "_id" : "worldEdges/72968", 
    "_from" : "worldVertices/country-austria", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k32y--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72970", 
    "_id" : "worldEdges/72970", 
    "_from" : "worldVertices/country-bahamas", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_hg5k32y--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72972", 
    "_id" : "worldEdges/72972", 
    "_from" : "worldVertices/country-bahrain", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_hg5k32y--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72974", 
    "_id" : "worldEdges/72974", 
    "_from" : "worldVertices/country-bangladesh", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_hg5k322---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72976", 
    "_id" : "worldEdges/72976", 
    "_from" : "worldVertices/country-barbados", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_hg5k322--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72978", 
    "_id" : "worldEdges/72978", 
    "_from" : "worldVertices/country-belgium", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k322--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72980", 
    "_id" : "worldEdges/72980", 
    "_from" : "worldVertices/country-bhutan", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_hg5k322--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72982", 
    "_id" : "worldEdges/72982", 
    "_from" : "worldVertices/country-bolivia", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_hg5k322--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72984", 
    "_id" : "worldEdges/72984", 
    "_from" : "worldVertices/country-bosnia-and-herzegovina", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k322--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72986", 
    "_id" : "worldEdges/72986", 
    "_from" : "worldVertices/country-botswana", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_hg5k326---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72988", 
    "_id" : "worldEdges/72988", 
    "_from" : "worldVertices/country-brazil", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_hg5k326--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72990", 
    "_id" : "worldEdges/72990", 
    "_from" : "worldVertices/country-brunei", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_hg5k326--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72992", 
    "_id" : "worldEdges/72992", 
    "_from" : "worldVertices/country-bulgaria", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k326--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72994", 
    "_id" : "worldEdges/72994", 
    "_from" : "worldVertices/country-burkina-faso", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_hg5k326--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72996", 
    "_id" : "worldEdges/72996", 
    "_from" : "worldVertices/country-burundi", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_hg5k326--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "72998", 
    "_id" : "worldEdges/72998", 
    "_from" : "worldVertices/country-cambodia", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_hg5k33----", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73000", 
    "_id" : "worldEdges/73000", 
    "_from" : "worldVertices/country-cameroon", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_hg5k33---_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73002", 
    "_id" : "worldEdges/73002", 
    "_from" : "worldVertices/country-canada", 
    "_to" : "worldVertices/continent-north-america", 
    "_rev" : "_hg5k33---A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73004", 
    "_id" : "worldEdges/73004", 
    "_from" : "worldVertices/country-chad", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_hg5k33---B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73006", 
    "_id" : "worldEdges/73006", 
    "_from" : "worldVertices/country-chile", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_hg5k33---C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73008", 
    "_id" : "worldEdges/73008", 
    "_from" : "worldVertices/country-colombia", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_hg5k33C---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73010", 
    "_id" : "worldEdges/73010", 
    "_from" : "worldVertices/country-cote-d-ivoire", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_hg5k33C--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73012", 
    "_id" : "worldEdges/73012", 
    "_from" : "worldVertices/country-croatia", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k33C--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73014", 
    "_id" : "worldEdges/73014", 
    "_from" : "worldVertices/country-czech-republic", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k33C--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73016", 
    "_id" : "worldEdges/73016", 
    "_from" : "worldVertices/country-denmark", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k33C--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73018", 
    "_id" : "worldEdges/73018", 
    "_from" : "worldVertices/country-ecuador", 
    "_to" : "worldVertices/continent-south-america", 
    "_rev" : "_hg5k33G---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73020", 
    "_id" : "worldEdges/73020", 
    "_from" : "worldVertices/country-egypt", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_hg5k33G--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73022", 
    "_id" : "worldEdges/73022", 
    "_from" : "worldVertices/country-eritrea", 
    "_to" : "worldVertices/continent-africa", 
    "_rev" : "_hg5k33G--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73024", 
    "_id" : "worldEdges/73024", 
    "_from" : "worldVertices/country-finland", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k33G--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73026", 
    "_id" : "worldEdges/73026", 
    "_from" : "worldVertices/country-france", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k33G--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73028", 
    "_id" : "worldEdges/73028", 
    "_from" : "worldVertices/country-germany", 
    "_to" : "worldVertices/continent-europe", 
    "_rev" : "_hg5k33G--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73030", 
    "_id" : "worldEdges/73030", 
    "_from" : "worldVertices/country-people-s-republic-of-china", 
    "_to" : "worldVertices/continent-asia", 
    "_rev" : "_hg5k33K---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73032", 
    "_id" : "worldEdges/73032", 
    "_from" : "worldVertices/capital-algiers", 
    "_to" : "worldVertices/country-algeria", 
    "_rev" : "_hg5k33K--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73034", 
    "_id" : "worldEdges/73034", 
    "_from" : "worldVertices/capital-andorra-la-vella", 
    "_to" : "worldVertices/country-andorra", 
    "_rev" : "_hg5k33K--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73036", 
    "_id" : "worldEdges/73036", 
    "_from" : "worldVertices/capital-asmara", 
    "_to" : "worldVertices/country-eritrea", 
    "_rev" : "_hg5k33K--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73038", 
    "_id" : "worldEdges/73038", 
    "_from" : "worldVertices/capital-bandar-seri-begawan", 
    "_to" : "worldVertices/country-brunei", 
    "_rev" : "_hg5k33K--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73040", 
    "_id" : "worldEdges/73040", 
    "_from" : "worldVertices/capital-beijing", 
    "_to" : "worldVertices/country-people-s-republic-of-china", 
    "_rev" : "_hg5k33O---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73042", 
    "_id" : "worldEdges/73042", 
    "_from" : "worldVertices/capital-berlin", 
    "_to" : "worldVertices/country-germany", 
    "_rev" : "_hg5k33O--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73044", 
    "_id" : "worldEdges/73044", 
    "_from" : "worldVertices/capital-bogota", 
    "_to" : "worldVertices/country-colombia", 
    "_rev" : "_hg5k33O--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73046", 
    "_id" : "worldEdges/73046", 
    "_from" : "worldVertices/capital-brasilia", 
    "_to" : "worldVertices/country-brazil", 
    "_rev" : "_hg5k33O--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73048", 
    "_id" : "worldEdges/73048", 
    "_from" : "worldVertices/capital-bridgetown", 
    "_to" : "worldVertices/country-barbados", 
    "_rev" : "_hg5k33O--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73050", 
    "_id" : "worldEdges/73050", 
    "_from" : "worldVertices/capital-brussels", 
    "_to" : "worldVertices/country-belgium", 
    "_rev" : "_hg5k33O--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73052", 
    "_id" : "worldEdges/73052", 
    "_from" : "worldVertices/capital-buenos-aires", 
    "_to" : "worldVertices/country-argentina", 
    "_rev" : "_hg5k33S---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73054", 
    "_id" : "worldEdges/73054", 
    "_from" : "worldVertices/capital-bujumbura", 
    "_to" : "worldVertices/country-burundi", 
    "_rev" : "_hg5k33S--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73056", 
    "_id" : "worldEdges/73056", 
    "_from" : "worldVertices/capital-cairo", 
    "_to" : "worldVertices/country-egypt", 
    "_rev" : "_hg5k33S--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73058", 
    "_id" : "worldEdges/73058", 
    "_from" : "worldVertices/capital-canberra", 
    "_to" : "worldVertices/country-australia", 
    "_rev" : "_hg5k33S--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73060", 
    "_id" : "worldEdges/73060", 
    "_from" : "worldVertices/capital-copenhagen", 
    "_to" : "worldVertices/country-denmark", 
    "_rev" : "_hg5k33S--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73062", 
    "_id" : "worldEdges/73062", 
    "_from" : "worldVertices/capital-dhaka", 
    "_to" : "worldVertices/country-bangladesh", 
    "_rev" : "_hg5k33S--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73064", 
    "_id" : "worldEdges/73064", 
    "_from" : "worldVertices/capital-gaborone", 
    "_to" : "worldVertices/country-botswana", 
    "_rev" : "_hg5k33W---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73066", 
    "_id" : "worldEdges/73066", 
    "_from" : "worldVertices/capital-helsinki", 
    "_to" : "worldVertices/country-finland", 
    "_rev" : "_hg5k33W--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73068", 
    "_id" : "worldEdges/73068", 
    "_from" : "worldVertices/capital-kabul", 
    "_to" : "worldVertices/country-afghanistan", 
    "_rev" : "_hg5k33W--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73070", 
    "_id" : "worldEdges/73070", 
    "_from" : "worldVertices/capital-la-paz", 
    "_to" : "worldVertices/country-bolivia", 
    "_rev" : "_hg5k33W--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73072", 
    "_id" : "worldEdges/73072", 
    "_from" : "worldVertices/capital-luanda", 
    "_to" : "worldVertices/country-angola", 
    "_rev" : "_hg5k33W--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73074", 
    "_id" : "worldEdges/73074", 
    "_from" : "worldVertices/capital-manama", 
    "_to" : "worldVertices/country-bahrain", 
    "_rev" : "_hg5k33W--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73076", 
    "_id" : "worldEdges/73076", 
    "_from" : "worldVertices/capital-nassau", 
    "_to" : "worldVertices/country-bahamas", 
    "_rev" : "_hg5k33W--E", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73078", 
    "_id" : "worldEdges/73078", 
    "_from" : "worldVertices/capital-n-djamena", 
    "_to" : "worldVertices/country-chad", 
    "_rev" : "_hg5k33a---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73080", 
    "_id" : "worldEdges/73080", 
    "_from" : "worldVertices/capital-ottawa", 
    "_to" : "worldVertices/country-canada", 
    "_rev" : "_hg5k33a--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73082", 
    "_id" : "worldEdges/73082", 
    "_from" : "worldVertices/capital-ouagadougou", 
    "_to" : "worldVertices/country-burkina-faso", 
    "_rev" : "_hg5k33a--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73084", 
    "_id" : "worldEdges/73084", 
    "_from" : "worldVertices/capital-paris", 
    "_to" : "worldVertices/country-france", 
    "_rev" : "_hg5k33a--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73086", 
    "_id" : "worldEdges/73086", 
    "_from" : "worldVertices/capital-phnom-penh", 
    "_to" : "worldVertices/country-cambodia", 
    "_rev" : "_hg5k33a--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73088", 
    "_id" : "worldEdges/73088", 
    "_from" : "worldVertices/capital-prague", 
    "_to" : "worldVertices/country-czech-republic", 
    "_rev" : "_hg5k33e---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73090", 
    "_id" : "worldEdges/73090", 
    "_from" : "worldVertices/capital-quito", 
    "_to" : "worldVertices/country-ecuador", 
    "_rev" : "_hg5k33e--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73092", 
    "_id" : "worldEdges/73092", 
    "_from" : "worldVertices/capital-saint-john-s", 
    "_to" : "worldVertices/country-antigua-and-barbuda", 
    "_rev" : "_hg5k33e--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73094", 
    "_id" : "worldEdges/73094", 
    "_from" : "worldVertices/capital-santiago", 
    "_to" : "worldVertices/country-chile", 
    "_rev" : "_hg5k33e--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73096", 
    "_id" : "worldEdges/73096", 
    "_from" : "worldVertices/capital-sarajevo", 
    "_to" : "worldVertices/country-bosnia-and-herzegovina", 
    "_rev" : "_hg5k33e--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73098", 
    "_id" : "worldEdges/73098", 
    "_from" : "worldVertices/capital-sofia", 
    "_to" : "worldVertices/country-bulgaria", 
    "_rev" : "_hg5k33e--D", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73100", 
    "_id" : "worldEdges/73100", 
    "_from" : "worldVertices/capital-thimphu", 
    "_to" : "worldVertices/country-bhutan", 
    "_rev" : "_hg5k33i---", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73102", 
    "_id" : "worldEdges/73102", 
    "_from" : "worldVertices/capital-tirana", 
    "_to" : "worldVertices/country-albania", 
    "_rev" : "_hg5k33i--_", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73104", 
    "_id" : "worldEdges/73104", 
    "_from" : "worldVertices/capital-vienna", 
    "_to" : "worldVertices/country-austria", 
    "_rev" : "_hg5k33i--A", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73106", 
    "_id" : "worldEdges/73106", 
    "_from" : "worldVertices/capital-yamoussoukro", 
    "_to" : "worldVertices/country-cote-d-ivoire", 
    "_rev" : "_hg5k33i--B", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73108", 
    "_id" : "worldEdges/73108", 
    "_from" : "worldVertices/capital-yaounde", 
    "_to" : "worldVertices/country-cameroon", 
    "_rev" : "_hg5k33i--C", 
    "type" : "is-in" 
  }, 
  { 
    "_key" : "73110", 
    "_id" : "worldEdges/73110", 
    "_from" : "worldVertices/capital-zagreb", 
    "_to" : "worldVertices/country-croatia", 
    "_rev" : "_hg5k33i--D", 
    "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" : "_hg5k4NC---", 
    "name" : "Alice" 
  }, 
  { 
    "_key" : "diana", 
    "_id" : "female/diana", 
    "_rev" : "_hg5k4NC--B", 
    "name" : "Diana" 
  } 
]

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

[ 
  { 
    "_key" : "73550", 
    "_id" : "relation/73550", 
    "_from" : "female/alice", 
    "_to" : "male/bob", 
    "_rev" : "_hg5k4NC--C", 
    "type" : "married", 
    "vertex" : "alice" 
  }, 
  { 
    "_key" : "73552", 
    "_id" : "relation/73552", 
    "_from" : "female/alice", 
    "_to" : "male/charly", 
    "_rev" : "_hg5k4NC--D", 
    "type" : "friend", 
    "vertex" : "alice" 
  }, 
  { 
    "_key" : "73554", 
    "_id" : "relation/73554", 
    "_from" : "male/charly", 
    "_to" : "female/diana", 
    "_rev" : "_hg5k4NG---", 
    "type" : "married", 
    "vertex" : "charly" 
  }, 
  { 
    "_key" : "73556", 
    "_id" : "relation/73556", 
    "_from" : "male/bob", 
    "_to" : "female/diana", 
    "_rev" : "_hg5k4NG--_", 
    "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" : "_hg5k4ju--B", 
    "population" : 80000, 
    "isCapital" : false, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        4.84, 
        45.76 
      ] 
    } 
  }, 
  { 
    "_key" : "Paris", 
    "_id" : "frenchCity/Paris", 
    "_rev" : "_hg5k4ju--C", 
    "population" : 4000000, 
    "isCapital" : true, 
    "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
        2.3508, 
        48.8567 
      ] 
    } 
  } 
]

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

[ 
  { 
    "_key" : "73732", 
    "_id" : "germanHighway/73732", 
    "_from" : "germanCity/Berlin", 
    "_to" : "germanCity/Cologne", 
    "_rev" : "_hg5k4j2---", 
    "distance" : 850 
  }, 
  { 
    "_key" : "73734", 
    "_id" : "germanHighway/73734", 
    "_from" : "germanCity/Berlin", 
    "_to" : "germanCity/Hamburg", 
    "_rev" : "_hg5k4j2--_", 
    "distance" : 400 
  }, 
  { 
    "_key" : "73736", 
    "_id" : "germanHighway/73736", 
    "_from" : "germanCity/Hamburg", 
    "_to" : "germanCity/Cologne", 
    "_rev" : "_hg5k4j2--A", 
    "distance" : 500 
  } 
]

[ 
  { 
    "_key" : "73738", 
    "_id" : "frenchHighway/73738", 
    "_from" : "frenchCity/Paris", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_hg5k4j2--B", 
    "distance" : 550 
  } 
]

[ 
  { 
    "_key" : "73740", 
    "_id" : "internationalHighway/73740", 
    "_from" : "germanCity/Berlin", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_hg5k4j6---", 
    "distance" : 1100 
  }, 
  { 
    "_key" : "73742", 
    "_id" : "internationalHighway/73742", 
    "_from" : "germanCity/Berlin", 
    "_to" : "frenchCity/Paris", 
    "_rev" : "_hg5k4j6--_", 
    "distance" : 1200 
  }, 
  { 
    "_key" : "73744", 
    "_id" : "internationalHighway/73744", 
    "_from" : "germanCity/Hamburg", 
    "_to" : "frenchCity/Paris", 
    "_rev" : "_hg5k4j6--A", 
    "distance" : 900 
  }, 
  { 
    "_key" : "73746", 
    "_id" : "internationalHighway/73746", 
    "_from" : "germanCity/Hamburg", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_hg5k4j6--B", 
    "distance" : 1300 
  }, 
  { 
    "_key" : "73748", 
    "_id" : "internationalHighway/73748", 
    "_from" : "germanCity/Cologne", 
    "_to" : "frenchCity/Lyon", 
    "_rev" : "_hg5k4j6--C", 
    "distance" : 700 
  }, 
  { 
    "_key" : "73750", 
    "_id" : "internationalHighway/73750", 
    "_from" : "germanCity/Cologne", 
    "_to" : "frenchCity/Paris", 
    "_rev" : "_hg5k4j6--D", 
    "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" : "_hg5k45C---" 
  }, 
  { 
    "_key" : "A2", 
    "_id" : "components/A2", 
    "_rev" : "_hg5k45G---" 
  }, 
  { 
    "_key" : "A3", 
    "_id" : "components/A3", 
    "_rev" : "_hg5k45G--_" 
  }, 
  { 
    "_key" : "A4", 
    "_id" : "components/A4", 
    "_rev" : "_hg5k45G--A" 
  }, 
  { 
    "_key" : "B1", 
    "_id" : "components/B1", 
    "_rev" : "_hg5k45G--B" 
  }, 
  { 
    "_key" : "B3", 
    "_id" : "components/B3", 
    "_rev" : "_hg5k45G--C" 
  }, 
  { 
    "_key" : "B2", 
    "_id" : "components/B2", 
    "_rev" : "_hg5k45K---" 
  }, 
  { 
    "_key" : "B4", 
    "_id" : "components/B4", 
    "_rev" : "_hg5k45K--_" 
  }, 
  { 
    "_key" : "B6", 
    "_id" : "components/B6", 
    "_rev" : "_hg5k45K--A" 
  }, 
  { 
    "_key" : "B5", 
    "_id" : "components/B5", 
    "_rev" : "_hg5k45K--B" 
  }, 
  { 
    "_key" : "B7", 
    "_id" : "components/B7", 
    "_rev" : "_hg5k45K--C" 
  }, 
  { 
    "_key" : "B8", 
    "_id" : "components/B8", 
    "_rev" : "_hg5k45O---" 
  }, 
  { 
    "_key" : "B9", 
    "_id" : "components/B9", 
    "_rev" : "_hg5k45O--_" 
  }, 
  { 
    "_key" : "B10", 
    "_id" : "components/B10", 
    "_rev" : "_hg5k45O--A" 
  }, 
  { 
    "_key" : "B19", 
    "_id" : "components/B19", 
    "_rev" : "_hg5k45O--B" 
  }, 
  { 
    "_key" : "B11", 
    "_id" : "components/B11", 
    "_rev" : "_hg5k45O--C" 
  }, 
  { 
    "_key" : "B12", 
    "_id" : "components/B12", 
    "_rev" : "_hg5k45O--D" 
  }, 
  { 
    "_key" : "B13", 
    "_id" : "components/B13", 
    "_rev" : "_hg5k45S---" 
  }, 
  { 
    "_key" : "B20", 
    "_id" : "components/B20", 
    "_rev" : "_hg5k45S--_" 
  }, 
  { 
    "_key" : "B14", 
    "_id" : "components/B14", 
    "_rev" : "_hg5k45S--A" 
  }, 
  { 
    "_key" : "B15", 
    "_id" : "components/B15", 
    "_rev" : "_hg5k45S--B" 
  }, 
  { 
    "_key" : "B16", 
    "_id" : "components/B16", 
    "_rev" : "_hg5k45S--C" 
  }, 
  { 
    "_key" : "B17", 
    "_id" : "components/B17", 
    "_rev" : "_hg5k45S--D" 
  }, 
  { 
    "_key" : "B18", 
    "_id" : "components/B18", 
    "_rev" : "_hg5k45S--E" 
  }, 
  { 
    "_key" : "B21", 
    "_id" : "components/B21", 
    "_rev" : "_hg5k45S--F" 
  }, 
  { 
    "_key" : "B22", 
    "_id" : "components/B22", 
    "_rev" : "_hg5k45W---" 
  }, 
  { 
    "_key" : "C1", 
    "_id" : "components/C1", 
    "_rev" : "_hg5k45W--_" 
  }, 
  { 
    "_key" : "C2", 
    "_id" : "components/C2", 
    "_rev" : "_hg5k45W--A" 
  }, 
  { 
    "_key" : "C3", 
    "_id" : "components/C3", 
    "_rev" : "_hg5k45W--B" 
  }, 
  { 
    "_key" : "C4", 
    "_id" : "components/C4", 
    "_rev" : "_hg5k45W--C" 
  }, 
  { 
    "_key" : "C5", 
    "_id" : "components/C5", 
    "_rev" : "_hg5k45W--D" 
  }, 
  { 
    "_key" : "C7", 
    "_id" : "components/C7", 
    "_rev" : "_hg5k45W--E" 
  }, 
  { 
    "_key" : "C6", 
    "_id" : "components/C6", 
    "_rev" : "_hg5k45a---" 
  }, 
  { 
    "_key" : "C8", 
    "_id" : "components/C8", 
    "_rev" : "_hg5k45a--_" 
  }, 
  { 
    "_key" : "C9", 
    "_id" : "components/C9", 
    "_rev" : "_hg5k45a--A" 
  }, 
  { 
    "_key" : "C10", 
    "_id" : "components/C10", 
    "_rev" : "_hg5k45a--B" 
  } 
]

[ 
  { 
    "_key" : "74000", 
    "_id" : "connections/74000", 
    "_from" : "components/A1", 
    "_to" : "components/A2", 
    "_rev" : "_hg5k45a--C" 
  }, 
  { 
    "_key" : "74002", 
    "_id" : "connections/74002", 
    "_from" : "components/A2", 
    "_to" : "components/A3", 
    "_rev" : "_hg5k45a--D" 
  }, 
  { 
    "_key" : "74004", 
    "_id" : "connections/74004", 
    "_from" : "components/A3", 
    "_to" : "components/A4", 
    "_rev" : "_hg5k45e---" 
  }, 
  { 
    "_key" : "74006", 
    "_id" : "connections/74006", 
    "_from" : "components/A4", 
    "_to" : "components/A1", 
    "_rev" : "_hg5k45e--_" 
  }, 
  { 
    "_key" : "74008", 
    "_id" : "connections/74008", 
    "_from" : "components/B1", 
    "_to" : "components/B3", 
    "_rev" : "_hg5k45i---" 
  }, 
  { 
    "_key" : "74010", 
    "_id" : "connections/74010", 
    "_from" : "components/B2", 
    "_to" : "components/B4", 
    "_rev" : "_hg5k45i--_" 
  }, 
  { 
    "_key" : "74012", 
    "_id" : "connections/74012", 
    "_from" : "components/B3", 
    "_to" : "components/B6", 
    "_rev" : "_hg5k45i--A" 
  }, 
  { 
    "_key" : "74014", 
    "_id" : "connections/74014", 
    "_from" : "components/B4", 
    "_to" : "components/B3", 
    "_rev" : "_hg5k45i--B" 
  }, 
  { 
    "_key" : "74016", 
    "_id" : "connections/74016", 
    "_from" : "components/B4", 
    "_to" : "components/B5", 
    "_rev" : "_hg5k45m---" 
  }, 
  { 
    "_key" : "74018", 
    "_id" : "connections/74018", 
    "_from" : "components/B6", 
    "_to" : "components/B7", 
    "_rev" : "_hg5k45m--_" 
  }, 
  { 
    "_key" : "74020", 
    "_id" : "connections/74020", 
    "_from" : "components/B7", 
    "_to" : "components/B8", 
    "_rev" : "_hg5k45m--A" 
  }, 
  { 
    "_key" : "74022", 
    "_id" : "connections/74022", 
    "_from" : "components/B7", 
    "_to" : "components/B9", 
    "_rev" : "_hg5k45m--B" 
  }, 
  { 
    "_key" : "74024", 
    "_id" : "connections/74024", 
    "_from" : "components/B7", 
    "_to" : "components/B10", 
    "_rev" : "_hg5k45m--C" 
  }, 
  { 
    "_key" : "74026", 
    "_id" : "connections/74026", 
    "_from" : "components/B7", 
    "_to" : "components/B19", 
    "_rev" : "_hg5k45m--D" 
  }, 
  { 
    "_key" : "74028", 
    "_id" : "connections/74028", 
    "_from" : "components/B11", 
    "_to" : "components/B10", 
    "_rev" : "_hg5k45q---" 
  }, 
  { 
    "_key" : "74030", 
    "_id" : "connections/74030", 
    "_from" : "components/B12", 
    "_to" : "components/B11", 
    "_rev" : "_hg5k45q--_" 
  }, 
  { 
    "_key" : "74032", 
    "_id" : "connections/74032", 
    "_from" : "components/B13", 
    "_to" : "components/B12", 
    "_rev" : "_hg5k45q--A" 
  }, 
  { 
    "_key" : "74034", 
    "_id" : "connections/74034", 
    "_from" : "components/B13", 
    "_to" : "components/B20", 
    "_rev" : "_hg5k45q--B" 
  }, 
  { 
    "_key" : "74036", 
    "_id" : "connections/74036", 
    "_from" : "components/B14", 
    "_to" : "components/B13", 
    "_rev" : "_hg5k45q--C" 
  }, 
  { 
    "_key" : "74038", 
    "_id" : "connections/74038", 
    "_from" : "components/B15", 
    "_to" : "components/B14", 
    "_rev" : "_hg5k45u---" 
  }, 
  { 
    "_key" : "74040", 
    "_id" : "connections/74040", 
    "_from" : "components/B15", 
    "_to" : "components/B16", 
    "_rev" : "_hg5k45u--_" 
  }, 
  { 
    "_key" : "74042", 
    "_id" : "connections/74042", 
    "_from" : "components/B17", 
    "_to" : "components/B15", 
    "_rev" : "_hg5k45u--A" 
  }, 
  { 
    "_key" : "74044", 
    "_id" : "connections/74044", 
    "_from" : "components/B17", 
    "_to" : "components/B18", 
    "_rev" : "_hg5k45u--B" 
  }, 
  { 
    "_key" : "74046", 
    "_id" : "connections/74046", 
    "_from" : "components/B19", 
    "_to" : "components/B17", 
    "_rev" : "_hg5k45u--C" 
  }, 
  { 
    "_key" : "74048", 
    "_id" : "connections/74048", 
    "_from" : "components/B20", 
    "_to" : "components/B21", 
    "_rev" : "_hg5k45y---" 
  }, 
  { 
    "_key" : "74050", 
    "_id" : "connections/74050", 
    "_from" : "components/B20", 
    "_to" : "components/B22", 
    "_rev" : "_hg5k45y--_" 
  }, 
  { 
    "_key" : "74052", 
    "_id" : "connections/74052", 
    "_from" : "components/C1", 
    "_to" : "components/C2", 
    "_rev" : "_hg5k45y--A" 
  }, 
  { 
    "_key" : "74054", 
    "_id" : "connections/74054", 
    "_from" : "components/C2", 
    "_to" : "components/C3", 
    "_rev" : "_hg5k45y--B" 
  }, 
  { 
    "_key" : "74056", 
    "_id" : "connections/74056", 
    "_from" : "components/C3", 
    "_to" : "components/C4", 
    "_rev" : "_hg5k452---" 
  }, 
  { 
    "_key" : "74058", 
    "_id" : "connections/74058", 
    "_from" : "components/C4", 
    "_to" : "components/C5", 
    "_rev" : "_hg5k452--_" 
  }, 
  { 
    "_key" : "74060", 
    "_id" : "connections/74060", 
    "_from" : "components/C4", 
    "_to" : "components/C7", 
    "_rev" : "_hg5k452--A" 
  }, 
  { 
    "_key" : "74062", 
    "_id" : "connections/74062", 
    "_from" : "components/C5", 
    "_to" : "components/C6", 
    "_rev" : "_hg5k452--B" 
  }, 
  { 
    "_key" : "74064", 
    "_id" : "connections/74064", 
    "_from" : "components/C5", 
    "_to" : "components/C7", 
    "_rev" : "_hg5k456---" 
  }, 
  { 
    "_key" : "74066", 
    "_id" : "connections/74066", 
    "_from" : "components/C7", 
    "_to" : "components/C8", 
    "_rev" : "_hg5k456--_" 
  }, 
  { 
    "_key" : "74068", 
    "_id" : "connections/74068", 
    "_from" : "components/C8", 
    "_to" : "components/C9", 
    "_rev" : "_hg5k456--A" 
  }, 
  { 
    "_key" : "74070", 
    "_id" : "connections/74070", 
    "_from" : "components/C8", 
    "_to" : "components/C10", 
    "_rev" : "_hg5k456--B" 
  } 
]

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. See this blogpost  for details and an import script.

More examples