ArangoDB Graphs
First Steps with Graphs
A Graph consists of vertices and edges. Edges are stored as documents in edge collections. A vertex can be a document of a document collection or of an edge collection (so edges can be used as vertices). Which collections are used within a named graph is defined via edge definitions. A named graph can contain more than one edge definition, at least one is needed. Graphs allow you to structure your models in line with your domain and group them logically in collections and giving you the power to query them in the same graph queries.
New to graphs? Take our free graph course for freshers and get from zero knowledge to advanced query techniques.
Coming from a relational background - what’s a graph?
In SQL you commonly have the construct of a relation table to store n:m relations between two data tables. An edge collection is somewhat similar to these relation tables; vertex collections resemble the data tables with the objects to connect. While simple graph queries with fixed number of hops via the relation table may be doable in SQL with several nested joins, graph databases can handle an arbitrary number of these hops over edge collections - this is called traversal. Also edges in one edge collection may point to several vertex collections. Its common to have attributes attached to edges, i.e. a label naming this interconnection. Edges have a direction, with their relations _from
and _to
pointing from one document to another document stored in vertex collections. In queries you can define in which directions the edge relations may be followed (OUTBOUND
: _from
→ _to
, INBOUND
: _from
← _to
, ANY
: _from
↔ _to
).
Named Graphs
Named graphs are completely managed by ArangoDB, and thus also visible in the web interface. They use the full spectrum of ArangoDB’s graph features. You may access them via several interfaces.
- AQL Graph Operations with several flavors:
- AQL Traversals on both named and anonymous graphs
- AQL Shortest Path on both named and anonymous graph
- JavaScript General Graph implementation, as you may use it in Foxx Services
- Graph Management; creating & manipulating graph definitions; inserting, updating and deleting vertices and edges into graphs
- Graph Functions for working with edges and vertices, to analyze them and their relations
- JavaScript SmartGraph implementation, for scalable graphs
- SmartGraph Management; creating & manipulating SmartGraph definitions; Differences to General Graph
- RESTful General Graph interface used to implement graph management in client drivers
Manipulating collections of named graphs with regular document functions
The underlying collections of the named graphs are still accessible using the standard methods for collections. However the graph module adds an additional layer on top of these collections giving you the following guarantees:
- All modifications are executed transactional
- If you delete a vertex all edges referring to this vertex will be deleted too
- If you insert an edge it is checked if the edge matches the edge definitions
Your edge collections will only contain valid edges and you will never have loose ends. These guarantees are lost if you access the collections in any other way than the graph module, so if you delete documents from your vertex collections directly, the edges pointing to them will be remain in place.
Existing inconsistencies in your data will not be corrected when you create a named graph. Therefore, make sure you start with sound data as otherwise there could be dangling edges after all. The graph module guarantees to not introduce new inconsistencies only.
Anonymous graphs
Sometimes you may not need all the powers of named graphs, but some of its bits may be valuable to you. You may use anonymous graphs in the traversals and in the Working with Edges chapter. Anonymous graphs don’t have edge definitions describing which vertex collection is connected by which edge collection. The graph model has to be maintained in the client side code. This gives you more freedom than the strict named graphs.
- AQL Graph Operations are available for both, named and anonymous graphs:
When to choose anonymous or named graphs?
As noted above, named graphs ensure graph integrity, both when inserting or removing edges or vertices. So you won’t encounter dangling edges, even if you use the same vertex collection in several named graphs. This involves more operations inside the database which come at a cost. Therefore anonymous graphs may be faster in many operations. So this question may be narrowed down to: ‘Can I afford the additional effort or do I need the warranty for integrity?’.
Multiple edge collections vs. FILTER
s on edge document attributes
If you want to only traverse edges of a specific type, there are two ways to achieve this. The first would be an attribute in the edge document - i.e. type
, where you specify a differentiator for the edge - i.e. "friends"
, "family"
, "married"
or "workmates"
, so you can later FILTER e.type = "friends"
if you only want to follow the friend edges.
Another way, which may be more efficient in some cases, is to use different edge collections for different types of edges, so you have friend_edges
, family_edges
, married_edges
and workmate_edges
as collection names. You can then configure several named graphs including a subset of the available edge and vertex collections - or you use anonymous graph queries, where you specify a list of edge collections to take into account in that query. To only follow friend edges, you would specify friend_edges
as sole edge collection.
Both approaches have advantages and disadvantages. FILTER
operations on edge attributes will do comparisons on each traversed edge, which may become CPU-intense. When not finding the edges in the first place because of the collection containing them is not traversed at all, there will never be a reason to actually check for their type
attribute with FILTER
.
The multiple edge collections approach is limited by the number of collections that can be used simultaneously in one query. Every collection used in a query requires some resources inside of ArangoDB and the number is therefore limited to cap the resource requirements. You may also have constraints on other edge attributes, such as a hash index with a unique constraint, which requires the documents to be in a single collection for the uniqueness guarantee, and it may thus not be possible to store the different types of edges in multiple edge collections.
So, if your edges have about a dozen different types, it’s okay to choose the collection approach, otherwise the FILTER
approach is preferred. You can still use FILTER
operations on edges of course. You can get rid of a FILTER
on the type
with the former approach, everything else can stay the same.
Which part of my data is an Edge and which a Vertex?
The main objects in your data model, such as users, groups or articles, are usually considered to be vertices. For each type of object, a document collection (also called vertex collection) should store the individual entities. Entities can be connected by edges to express and classify relations between vertices. It often makes sense to have an edge collection per relation type.
ArangoDB does not require you to store your data in graph structures with edges and vertices, you can also decide to embed attributes such as which groups a user is part of, or _id
s of documents in another document instead of connecting the documents with edges. It can be a meaningful performance optimization for 1:n relationships, if your data is not focused on relations and you don’t need graph traversal with varying depth. It usually means to introduce some redundancy and possibly inconsistencies if you embed data, but it can be an acceptable tradeoff.
Vertices
Let’s say we have two vertex collections, Users
and Groups
. Documents in the Groups
collection contain the attributes of the Group, i.e. when it was founded, its subject, an icon URL and so on. Users
documents contain the data specific to a user - like all names, birthdays, Avatar URLs, hobbies…
Edges
We can use an edge collection to store relations between users and groups. Since multiple users may be in an arbitrary number of groups, this is an m:n relation. The edge collection can be called UsersInGroups
with i.e. one edge with _from
pointing to Users/John
and _to
pointing to Groups/BowlingGroupHappyPin
. This makes the user John a member of the group Bowling Group Happy Pin. Attributes of this relation may contain qualifiers to this relation, like the permissions of John in this group, the date when he joined the group etc.
So roughly put, if you use documents and their attributes in a sentence, nouns would typically be vertices, verbs become the edges. You can see this in the knows graph below:
Alice knows Bob, who in term knows Charlie.
Advantages of this approach
Graphs give you the advantage of not just being able to have a fixed number of m:n relations in a row, but an arbitrary number. Edges can be traversed in both directions, so it’s easy to determine all groups a user is in, but also to find out which members a certain group has. Users could also be interconnected to create a social network.
Using the graph data model, dealing with data that has lots of relations stays manageable and can be queried in very flexible ways, whereas it would cause headache to handle it in a relational database system.
Backup and restore
For sure you want to have backups of your graph data, you can use arangodump to create the backup, and arangorestore to restore a backup into a new ArangoDB. You should however note that:
- you need the system collection
_graphs
if you backup named graphs. - you need to backup the complete set of all edge and vertex collections your graph consists of. Partial dump/restore may not work.
Managing graphs
By default you should use the interface your driver provides to manage graphs.
This is i.e. documented in Graphs-Section of the ArangoDB Java driver.
Example Graphs
ArangoDB comes with a set of easily graspable graphs that are used to demonstrate the APIs. You can use the add samples
tab in the create graph
window in the web interface, or load the module @arangodb/graph-examples/example-graph
in arangosh and use it to create instances of these graphs in your ArangoDB. Once you’ve created them, you can inspect them in the web interface - which was used to create the pictures below.
You can easily look into the innards of this script for reference about how to manage graphs programmatically.
The Knows_Graph
A set of persons knowing each other:
The knows graph consists of one vertex collection persons
connected via one edge collection knows
. It will contain five persons Alice, Bob, Charlie, Dave and Eve. We will have the following directed relations:
- Alice knows Bob
- Bob knows Charlie
- Bob knows Dave
- Eve knows Alice
- Eve knows Bob
This is how we create it, inspect its vertices and edges, and drop it again:
arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
arangosh> var g = examples.loadGraph("knows_graph");
arangosh> db.persons.toArray()
arangosh> db.knows.toArray();
arangosh> examples.dropGraph("knows_graph");
Show execution results
Hide execution results
[
{
"_key" : "alice",
"_id" : "persons/alice",
"_rev" : "_cuv9dV2---",
"name" : "Alice"
},
{
"_key" : "bob",
"_id" : "persons/bob",
"_rev" : "_cuv9dV6---",
"name" : "Bob"
},
{
"_key" : "charlie",
"_id" : "persons/charlie",
"_rev" : "_cuv9dV6--_",
"name" : "Charlie"
},
{
"_key" : "dave",
"_id" : "persons/dave",
"_rev" : "_cuv9dW----",
"name" : "Dave"
},
{
"_key" : "eve",
"_id" : "persons/eve",
"_rev" : "_cuv9dW---_",
"name" : "Eve"
}
]
[
{
"_key" : "79915",
"_id" : "knows/79915",
"_from" : "persons/alice",
"_to" : "persons/bob",
"_rev" : "_cuv9dW---A",
"vertex" : "alice"
},
{
"_key" : "79917",
"_id" : "knows/79917",
"_from" : "persons/bob",
"_to" : "persons/charlie",
"_rev" : "_cuv9dWC---",
"vertex" : "bob"
},
{
"_key" : "79919",
"_id" : "knows/79919",
"_from" : "persons/bob",
"_to" : "persons/dave",
"_rev" : "_cuv9dWC--_",
"vertex" : "bob"
},
{
"_key" : "79921",
"_id" : "knows/79921",
"_from" : "persons/eve",
"_to" : "persons/alice",
"_rev" : "_cuv9dWC--A",
"vertex" : "eve"
},
{
"_key" : "79923",
"_id" : "knows/79923",
"_from" : "persons/eve",
"_to" : "persons/bob",
"_rev" : "_cuv9dWG---",
"vertex" : "eve"
}
]
Note: with the default “Search Depth” of 2 of the graph viewer you may not see all edges of this graph.
The Social Graph
A set of persons and their relations:
This example has female and male persons as vertices in two vertex collections - female
and male
. The edges are their connections in the relation
edge collection. This is how we create it, inspect its vertices and edges, and drop it again:
arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
arangosh> var graph = examples.loadGraph("social");
arangosh> db.female.toArray()
arangosh> db.male.toArray()
arangosh> db.relation.toArray()
arangosh> examples.dropGraph("social");
Show execution results
Hide execution results
[
{
"_key" : "alice",
"_id" : "female/alice",
"_rev" : "_cuv9daa---",
"name" : "Alice"
},
{
"_key" : "diana",
"_id" : "female/diana",
"_rev" : "_cuv9dae--_",
"name" : "Diana"
}
]
[
{
"_key" : "bob",
"_id" : "male/bob",
"_rev" : "_cuv9daa--_",
"name" : "Bob"
},
{
"_key" : "charly",
"_id" : "male/charly",
"_rev" : "_cuv9dae---",
"name" : "Charly"
}
]
[
{
"_key" : "80167",
"_id" : "relation/80167",
"_from" : "female/alice",
"_to" : "male/bob",
"_rev" : "_cuv9dae--A",
"type" : "married",
"vertex" : "alice"
},
{
"_key" : "80169",
"_id" : "relation/80169",
"_from" : "female/alice",
"_to" : "male/charly",
"_rev" : "_cuv9dai---",
"type" : "friend",
"vertex" : "alice"
},
{
"_key" : "80171",
"_id" : "relation/80171",
"_from" : "male/charly",
"_to" : "female/diana",
"_rev" : "_cuv9dam---",
"type" : "married",
"vertex" : "charly"
},
{
"_key" : "80173",
"_id" : "relation/80173",
"_from" : "male/bob",
"_to" : "female/diana",
"_rev" : "_cuv9dam--_",
"type" : "friend",
"vertex" : "bob"
}
]
The City Graph
A set of european cities, and their fictional traveling distances as connections:
The example has the cities as vertices in several vertex collections - germanCity
and frenchCity
. The edges are their interconnections in several edge collections french / german / international Highway
. This is how we create it, inspect its edges and vertices, and drop it again:
arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
arangosh> var g = examples.loadGraph("routeplanner");
arangosh> db.frenchCity.toArray();
arangosh> db.germanCity.toArray();
arangosh> db.germanHighway.toArray();
arangosh> db.frenchHighway.toArray();
arangosh> db.internationalHighway.toArray();
arangosh> examples.dropGraph("routeplanner");
Show execution results
Hide execution results
[
{
"_key" : "Lyon",
"_id" : "frenchCity/Lyon",
"_rev" : "_cuv9dQG--_",
"population" : 80000,
"isCapital" : false,
"geometry" : {
"type" : "Point",
"coordinates" : [
4.84,
45.76
]
}
},
{
"_key" : "Paris",
"_id" : "frenchCity/Paris",
"_rev" : "_cuv9dQG--A",
"population" : 4000000,
"isCapital" : true,
"geometry" : {
"type" : "Point",
"coordinates" : [
2.3508,
48.8567
]
}
}
]
[
{
"_key" : "Berlin",
"_id" : "germanCity/Berlin",
"_rev" : "_cuv9dQC---",
"population" : 3000000,
"isCapital" : true,
"geometry" : {
"type" : "Point",
"coordinates" : [
13.3833,
52.5167
]
}
},
{
"_key" : "Cologne",
"_id" : "germanCity/Cologne",
"_rev" : "_cuv9dQC--_",
"population" : 1000000,
"isCapital" : false,
"geometry" : {
"type" : "Point",
"coordinates" : [
6.9528,
50.9364
]
}
},
{
"_key" : "Hamburg",
"_id" : "germanCity/Hamburg",
"_rev" : "_cuv9dQG---",
"population" : 1000000,
"isCapital" : false,
"geometry" : {
"type" : "Point",
"coordinates" : [
10.0014,
53.5653
]
}
}
]
[
{
"_key" : "79678",
"_id" : "germanHighway/79678",
"_from" : "germanCity/Berlin",
"_to" : "germanCity/Cologne",
"_rev" : "_cuv9dQO---",
"distance" : 850
},
{
"_key" : "79680",
"_id" : "germanHighway/79680",
"_from" : "germanCity/Berlin",
"_to" : "germanCity/Hamburg",
"_rev" : "_cuv9dQS---",
"distance" : 400
},
{
"_key" : "79682",
"_id" : "germanHighway/79682",
"_from" : "germanCity/Hamburg",
"_to" : "germanCity/Cologne",
"_rev" : "_cuv9dQS--_",
"distance" : 500
}
]
[
{
"_key" : "79684",
"_id" : "frenchHighway/79684",
"_from" : "frenchCity/Paris",
"_to" : "frenchCity/Lyon",
"_rev" : "_cuv9dQS--A",
"distance" : 550
}
]
[
{
"_key" : "79686",
"_id" : "internationalHighway/79686",
"_from" : "germanCity/Berlin",
"_to" : "frenchCity/Lyon",
"_rev" : "_cuv9dQW---",
"distance" : 1100
},
{
"_key" : "79688",
"_id" : "internationalHighway/79688",
"_from" : "germanCity/Berlin",
"_to" : "frenchCity/Paris",
"_rev" : "_cuv9dQW--_",
"distance" : 1200
},
{
"_key" : "79690",
"_id" : "internationalHighway/79690",
"_from" : "germanCity/Hamburg",
"_to" : "frenchCity/Paris",
"_rev" : "_cuv9dQW--A",
"distance" : 900
},
{
"_key" : "79692",
"_id" : "internationalHighway/79692",
"_from" : "germanCity/Hamburg",
"_to" : "frenchCity/Lyon",
"_rev" : "_cuv9dQa---",
"distance" : 1300
},
{
"_key" : "79694",
"_id" : "internationalHighway/79694",
"_from" : "germanCity/Cologne",
"_to" : "frenchCity/Lyon",
"_rev" : "_cuv9dQe---",
"distance" : 700
},
{
"_key" : "79696",
"_id" : "internationalHighway/79696",
"_from" : "germanCity/Cologne",
"_to" : "frenchCity/Paris",
"_rev" : "_cuv9dQe--_",
"distance" : 550
}
]
The Traversal Graph
This graph was designed to demonstrate filters in traversals. It has some labels to filter on it.
The example has all its vertices in the circles collection, and an edges edge collection to connect them. 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 neighbours of the root-node A. Starting from A the graph has a depth of 3 on all its paths.
arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
arangosh> var g = examples.loadGraph("traversalGraph");
arangosh> db.circles.toArray();
arangosh> db.edges.toArray();
arangosh> examples.dropGraph("traversalGraph");
Show execution results
Hide execution results
[
{
"_key" : "A",
"_id" : "circles/A",
"_rev" : "_cuv9dbW---",
"label" : "1"
},
{
"_key" : "B",
"_id" : "circles/B",
"_rev" : "_cuv9dba---",
"label" : "2"
},
{
"_key" : "C",
"_id" : "circles/C",
"_rev" : "_cuv9dba--_",
"label" : "3"
},
{
"_key" : "D",
"_id" : "circles/D",
"_rev" : "_cuv9dba--A",
"label" : "4"
},
{
"_key" : "E",
"_id" : "circles/E",
"_rev" : "_cuv9dbe---",
"label" : "5"
},
{
"_key" : "F",
"_id" : "circles/F",
"_rev" : "_cuv9dbe--_",
"label" : "6"
},
{
"_key" : "G",
"_id" : "circles/G",
"_rev" : "_cuv9dbe--A",
"label" : "7"
},
{
"_key" : "H",
"_id" : "circles/H",
"_rev" : "_cuv9dbe--B",
"label" : "8"
},
{
"_key" : "I",
"_id" : "circles/I",
"_rev" : "_cuv9dbe--C",
"label" : "9"
},
{
"_key" : "J",
"_id" : "circles/J",
"_rev" : "_cuv9dbi---",
"label" : "10"
},
{
"_key" : "K",
"_id" : "circles/K",
"_rev" : "_cuv9dbi--_",
"label" : "11"
}
]
[
{
"_key" : "80234",
"_id" : "edges/80234",
"_from" : "circles/A",
"_to" : "circles/B",
"_rev" : "_cuv9dbi--A",
"theFalse" : false,
"theTruth" : true,
"label" : "left_bar"
},
{
"_key" : "80236",
"_id" : "edges/80236",
"_from" : "circles/B",
"_to" : "circles/C",
"_rev" : "_cuv9dbm---",
"theFalse" : false,
"theTruth" : true,
"label" : "left_blarg"
},
{
"_key" : "80238",
"_id" : "edges/80238",
"_from" : "circles/C",
"_to" : "circles/D",
"_rev" : "_cuv9dbm--_",
"theFalse" : false,
"theTruth" : true,
"label" : "left_blorg"
},
{
"_key" : "80240",
"_id" : "edges/80240",
"_from" : "circles/B",
"_to" : "circles/E",
"_rev" : "_cuv9dbm--A",
"theFalse" : false,
"theTruth" : true,
"label" : "left_blub"
},
{
"_key" : "80242",
"_id" : "edges/80242",
"_from" : "circles/E",
"_to" : "circles/F",
"_rev" : "_cuv9dbm--B",
"theFalse" : false,
"theTruth" : true,
"label" : "left_schubi"
},
{
"_key" : "80244",
"_id" : "edges/80244",
"_from" : "circles/A",
"_to" : "circles/G",
"_rev" : "_cuv9dbq---",
"theFalse" : false,
"theTruth" : true,
"label" : "right_foo"
},
{
"_key" : "80246",
"_id" : "edges/80246",
"_from" : "circles/G",
"_to" : "circles/H",
"_rev" : "_cuv9dbq--_",
"theFalse" : false,
"theTruth" : true,
"label" : "right_blob"
},
{
"_key" : "80248",
"_id" : "edges/80248",
"_from" : "circles/H",
"_to" : "circles/I",
"_rev" : "_cuv9dbq--A",
"theFalse" : false,
"theTruth" : true,
"label" : "right_blub"
},
{
"_key" : "80250",
"_id" : "edges/80250",
"_from" : "circles/G",
"_to" : "circles/J",
"_rev" : "_cuv9dbu---",
"theFalse" : false,
"theTruth" : true,
"label" : "right_zip"
},
{
"_key" : "80252",
"_id" : "edges/80252",
"_from" : "circles/J",
"_to" : "circles/K",
"_rev" : "_cuv9dbu--_",
"theFalse" : false,
"theTruth" : true,
"label" : "right_zup"
}
]
Note: with the default “Search Depth” of 2 of the graph viewer you may not see all nodes of this graph.
The k Shortest Paths Graph
The vertices in this graph are train stations of cities in Europe and North America and the edges represent train connections between them, with the travel time for both directions as edge weight.
See the k Shortest Paths page for query examples.
arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
arangosh> var g = examples.loadGraph("kShortestPathsGraph");
arangosh> db.places.toArray();
arangosh> db.connections.toArray();
arangosh> examples.dropGraph("kShortestPathsGraph");
Show execution results
Hide execution results
[
{
"_key" : "Inverness",
"_id" : "places/Inverness",
"_rev" : "_cuv9dW2---",
"label" : "Inverness"
},
{
"_key" : "Aberdeen",
"_id" : "places/Aberdeen",
"_rev" : "_cuv9dW2--_",
"label" : "Aberdeen"
},
{
"_key" : "Leuchars",
"_id" : "places/Leuchars",
"_rev" : "_cuv9dW6---",
"label" : "Leuchars"
},
{
"_key" : "StAndrews",
"_id" : "places/StAndrews",
"_rev" : "_cuv9dW6--_",
"label" : "StAndrews"
},
{
"_key" : "Edinburgh",
"_id" : "places/Edinburgh",
"_rev" : "_cuv9dX----",
"label" : "Edinburgh"
},
{
"_key" : "Glasgow",
"_id" : "places/Glasgow",
"_rev" : "_cuv9dX---_",
"label" : "Glasgow"
},
{
"_key" : "York",
"_id" : "places/York",
"_rev" : "_cuv9dX---A",
"label" : "York"
},
{
"_key" : "Carlisle",
"_id" : "places/Carlisle",
"_rev" : "_cuv9dXC---",
"label" : "Carlisle"
},
{
"_key" : "Birmingham",
"_id" : "places/Birmingham",
"_rev" : "_cuv9dXC--_",
"label" : "Birmingham"
},
{
"_key" : "London",
"_id" : "places/London",
"_rev" : "_cuv9dXG---",
"label" : "London"
},
{
"_key" : "Brussels",
"_id" : "places/Brussels",
"_rev" : "_cuv9dXG--_",
"label" : "Brussels"
},
{
"_key" : "Cologne",
"_id" : "places/Cologne",
"_rev" : "_cuv9dXG--A",
"label" : "Cologne"
},
{
"_key" : "Toronto",
"_id" : "places/Toronto",
"_rev" : "_cuv9dXK---",
"label" : "Toronto"
},
{
"_key" : "Winnipeg",
"_id" : "places/Winnipeg",
"_rev" : "_cuv9dXK--_",
"label" : "Winnipeg"
},
{
"_key" : "Saskatoon",
"_id" : "places/Saskatoon",
"_rev" : "_cuv9dXK--A",
"label" : "Saskatoon"
},
{
"_key" : "Edmonton",
"_id" : "places/Edmonton",
"_rev" : "_cuv9dXO---",
"label" : "Edmonton"
},
{
"_key" : "Jasper",
"_id" : "places/Jasper",
"_rev" : "_cuv9dXO--_",
"label" : "Jasper"
},
{
"_key" : "Vancouver",
"_id" : "places/Vancouver",
"_rev" : "_cuv9dXO--A",
"label" : "Vancouver"
}
]
[
{
"_key" : "79983",
"_id" : "connections/79983",
"_from" : "places/Inverness",
"_to" : "places/Aberdeen",
"_rev" : "_cuv9dXS---",
"travelTime" : 3
},
{
"_key" : "79985",
"_id" : "connections/79985",
"_from" : "places/Aberdeen",
"_to" : "places/Inverness",
"_rev" : "_cuv9dXS--_",
"travelTime" : 2.5
},
{
"_key" : "79987",
"_id" : "connections/79987",
"_from" : "places/Aberdeen",
"_to" : "places/Leuchars",
"_rev" : "_cuv9dXS--A",
"travelTime" : 1.5
},
{
"_key" : "79989",
"_id" : "connections/79989",
"_from" : "places/Leuchars",
"_to" : "places/Aberdeen",
"_rev" : "_cuv9dXW---",
"travelTime" : 1
},
{
"_key" : "79991",
"_id" : "connections/79991",
"_from" : "places/Leuchars",
"_to" : "places/Edinburgh",
"_rev" : "_cuv9dXW--_",
"travelTime" : 1.5
},
{
"_key" : "79993",
"_id" : "connections/79993",
"_from" : "places/Edinburgh",
"_to" : "places/Leuchars",
"_rev" : "_cuv9dXW--A",
"travelTime" : 3
},
{
"_key" : "79995",
"_id" : "connections/79995",
"_from" : "places/Edinburgh",
"_to" : "places/Glasgow",
"_rev" : "_cuv9dXa---",
"travelTime" : 1
},
{
"_key" : "79997",
"_id" : "connections/79997",
"_from" : "places/Glasgow",
"_to" : "places/Edinburgh",
"_rev" : "_cuv9dXa--_",
"travelTime" : 1
},
{
"_key" : "79999",
"_id" : "connections/79999",
"_from" : "places/Edinburgh",
"_to" : "places/York",
"_rev" : "_cuv9dXa--A",
"travelTime" : 3.5
},
{
"_key" : "80001",
"_id" : "connections/80001",
"_from" : "places/York",
"_to" : "places/Edinburgh",
"_rev" : "_cuv9dXe---",
"travelTime" : 4
},
{
"_key" : "80003",
"_id" : "connections/80003",
"_from" : "places/Glasgow",
"_to" : "places/Carlisle",
"_rev" : "_cuv9dXe--_",
"travelTime" : 1
},
{
"_key" : "80005",
"_id" : "connections/80005",
"_from" : "places/Carlisle",
"_to" : "places/Glasgow",
"_rev" : "_cuv9dXi---",
"travelTime" : 1
},
{
"_key" : "80007",
"_id" : "connections/80007",
"_from" : "places/Carlisle",
"_to" : "places/York",
"_rev" : "_cuv9dXi--_",
"travelTime" : 2.5
},
{
"_key" : "80009",
"_id" : "connections/80009",
"_from" : "places/York",
"_to" : "places/Carlisle",
"_rev" : "_cuv9dXm---",
"travelTime" : 3.5
},
{
"_key" : "80011",
"_id" : "connections/80011",
"_from" : "places/Carlisle",
"_to" : "places/Birmingham",
"_rev" : "_cuv9dXm--_",
"travelTime" : 2
},
{
"_key" : "80013",
"_id" : "connections/80013",
"_from" : "places/Birmingham",
"_to" : "places/Carlisle",
"_rev" : "_cuv9dXm--A",
"travelTime" : 1
},
{
"_key" : "80015",
"_id" : "connections/80015",
"_from" : "places/Birmingham",
"_to" : "places/London",
"_rev" : "_cuv9dXq---",
"travelTime" : 1.5
},
{
"_key" : "80017",
"_id" : "connections/80017",
"_from" : "places/London",
"_to" : "places/Birmingham",
"_rev" : "_cuv9dXq--_",
"travelTime" : 2.5
},
{
"_key" : "80019",
"_id" : "connections/80019",
"_from" : "places/Leuchars",
"_to" : "places/StAndrews",
"_rev" : "_cuv9dXu---",
"travelTime" : 0.2
},
{
"_key" : "80021",
"_id" : "connections/80021",
"_from" : "places/StAndrews",
"_to" : "places/Leuchars",
"_rev" : "_cuv9dXu--_",
"travelTime" : 0.2
},
{
"_key" : "80023",
"_id" : "connections/80023",
"_from" : "places/York",
"_to" : "places/London",
"_rev" : "_cuv9dXu--A",
"travelTime" : 1.8
},
{
"_key" : "80025",
"_id" : "connections/80025",
"_from" : "places/London",
"_to" : "places/York",
"_rev" : "_cuv9dXy---",
"travelTime" : 2
},
{
"_key" : "80027",
"_id" : "connections/80027",
"_from" : "places/London",
"_to" : "places/Brussels",
"_rev" : "_cuv9dXy--_",
"travelTime" : 2.5
},
{
"_key" : "80029",
"_id" : "connections/80029",
"_from" : "places/Brussels",
"_to" : "places/London",
"_rev" : "_cuv9dX2---",
"travelTime" : 3.5
},
{
"_key" : "80031",
"_id" : "connections/80031",
"_from" : "places/Brussels",
"_to" : "places/Cologne",
"_rev" : "_cuv9dX2--_",
"travelTime" : 2
},
{
"_key" : "80033",
"_id" : "connections/80033",
"_from" : "places/Cologne",
"_to" : "places/Brussels",
"_rev" : "_cuv9dX6---",
"travelTime" : 1.5
},
{
"_key" : "80035",
"_id" : "connections/80035",
"_from" : "places/Toronto",
"_to" : "places/Winnipeg",
"_rev" : "_cuv9dX6--_",
"travelTime" : 36
},
{
"_key" : "80037",
"_id" : "connections/80037",
"_from" : "places/Winnipeg",
"_to" : "places/Toronto",
"_rev" : "_cuv9dY----",
"travelTime" : 35
},
{
"_key" : "80039",
"_id" : "connections/80039",
"_from" : "places/Winnipeg",
"_to" : "places/Saskatoon",
"_rev" : "_cuv9dY---_",
"travelTime" : 12
},
{
"_key" : "80041",
"_id" : "connections/80041",
"_from" : "places/Saskatoon",
"_to" : "places/Winnipeg",
"_rev" : "_cuv9dY---A",
"travelTime" : 5
},
{
"_key" : "80043",
"_id" : "connections/80043",
"_from" : "places/Saskatoon",
"_to" : "places/Edmonton",
"_rev" : "_cuv9dY---B",
"travelTime" : 12
},
{
"_key" : "80045",
"_id" : "connections/80045",
"_from" : "places/Edmonton",
"_to" : "places/Saskatoon",
"_rev" : "_cuv9dYC---",
"travelTime" : 17
},
{
"_key" : "80047",
"_id" : "connections/80047",
"_from" : "places/Edmonton",
"_to" : "places/Jasper",
"_rev" : "_cuv9dYC--_",
"travelTime" : 6
},
{
"_key" : "80049",
"_id" : "connections/80049",
"_from" : "places/Jasper",
"_to" : "places/Edmonton",
"_rev" : "_cuv9dYC--A",
"travelTime" : 5
},
{
"_key" : "80051",
"_id" : "connections/80051",
"_from" : "places/Jasper",
"_to" : "places/Vancouver",
"_rev" : "_cuv9dYC--B",
"travelTime" : 12
},
{
"_key" : "80053",
"_id" : "connections/80053",
"_from" : "places/Vancouver",
"_to" : "places/Jasper",
"_rev" : "_cuv9dYG---",
"travelTime" : 13
}
]
The World Graph
The world country graph structures its nodes like that: world → continent → country → capital. In some cases edge directions aren’t forward (therefore it will be displayed disjunct in the graph viewer). It has two ways of creating it. One using the named graph utilities (worldCountry), one without (worldCountryUnManaged). It is used to demonstrate raw traversal operations.
arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
arangosh> var g = examples.loadGraph("worldCountry");
arangosh> db.worldVertices.toArray();
arangosh> db.worldEdges.toArray();
arangosh> examples.dropGraph("worldCountry");
arangosh> var g = examples.loadGraph("worldCountryUnManaged");
arangosh> examples.dropGraph("worldCountryUnManaged");
Show execution results
Hide execution results
[
{
"_key" : "world",
"_id" : "worldVertices/world",
"_rev" : "_cuv9dci---",
"name" : "World",
"type" : "root"
},
{
"_key" : "continent-africa",
"_id" : "worldVertices/continent-africa",
"_rev" : "_cuv9dcm---",
"name" : "Africa",
"type" : "continent"
},
{
"_key" : "continent-asia",
"_id" : "worldVertices/continent-asia",
"_rev" : "_cuv9dcm--_",
"name" : "Asia",
"type" : "continent"
},
{
"_key" : "continent-australia",
"_id" : "worldVertices/continent-australia",
"_rev" : "_cuv9dcm--A",
"name" : "Australia",
"type" : "continent"
},
{
"_key" : "continent-europe",
"_id" : "worldVertices/continent-europe",
"_rev" : "_cuv9dcq---",
"name" : "Europe",
"type" : "continent"
},
{
"_key" : "continent-north-america",
"_id" : "worldVertices/continent-north-america",
"_rev" : "_cuv9dcq--_",
"name" : "North America",
"type" : "continent"
},
{
"_key" : "continent-south-america",
"_id" : "worldVertices/continent-south-america",
"_rev" : "_cuv9dcq--A",
"name" : "South America",
"type" : "continent"
},
{
"_key" : "country-afghanistan",
"_id" : "worldVertices/country-afghanistan",
"_rev" : "_cuv9dcu---",
"name" : "Afghanistan",
"type" : "country",
"code" : "AFG"
},
{
"_key" : "country-albania",
"_id" : "worldVertices/country-albania",
"_rev" : "_cuv9dcu--_",
"name" : "Albania",
"type" : "country",
"code" : "ALB"
},
{
"_key" : "country-algeria",
"_id" : "worldVertices/country-algeria",
"_rev" : "_cuv9dcu--A",
"name" : "Algeria",
"type" : "country",
"code" : "DZA"
},
{
"_key" : "country-andorra",
"_id" : "worldVertices/country-andorra",
"_rev" : "_cuv9dcy---",
"name" : "Andorra",
"type" : "country",
"code" : "AND"
},
{
"_key" : "country-angola",
"_id" : "worldVertices/country-angola",
"_rev" : "_cuv9dcy--_",
"name" : "Angola",
"type" : "country",
"code" : "AGO"
},
{
"_key" : "country-antigua-and-barbuda",
"_id" : "worldVertices/country-antigua-and-barbuda",
"_rev" : "_cuv9dcy--A",
"name" : "Antigua and Barbuda",
"type" : "country",
"code" : "ATG"
},
{
"_key" : "country-argentina",
"_id" : "worldVertices/country-argentina",
"_rev" : "_cuv9dc2---",
"name" : "Argentina",
"type" : "country",
"code" : "ARG"
},
{
"_key" : "country-australia",
"_id" : "worldVertices/country-australia",
"_rev" : "_cuv9dc2--_",
"name" : "Australia",
"type" : "country",
"code" : "AUS"
},
{
"_key" : "country-austria",
"_id" : "worldVertices/country-austria",
"_rev" : "_cuv9dd----",
"name" : "Austria",
"type" : "country",
"code" : "AUT"
},
{
"_key" : "country-bahamas",
"_id" : "worldVertices/country-bahamas",
"_rev" : "_cuv9dd---_",
"name" : "Bahamas",
"type" : "country",
"code" : "BHS"
},
{
"_key" : "country-bahrain",
"_id" : "worldVertices/country-bahrain",
"_rev" : "_cuv9dd---A",
"name" : "Bahrain",
"type" : "country",
"code" : "BHR"
},
{
"_key" : "country-bangladesh",
"_id" : "worldVertices/country-bangladesh",
"_rev" : "_cuv9ddC---",
"name" : "Bangladesh",
"type" : "country",
"code" : "BGD"
},
{
"_key" : "country-barbados",
"_id" : "worldVertices/country-barbados",
"_rev" : "_cuv9ddC--_",
"name" : "Barbados",
"type" : "country",
"code" : "BRB"
},
{
"_key" : "country-belgium",
"_id" : "worldVertices/country-belgium",
"_rev" : "_cuv9ddC--A",
"name" : "Belgium",
"type" : "country",
"code" : "BEL"
},
{
"_key" : "country-bhutan",
"_id" : "worldVertices/country-bhutan",
"_rev" : "_cuv9ddC--B",
"name" : "Bhutan",
"type" : "country",
"code" : "BTN"
},
{
"_key" : "country-bolivia",
"_id" : "worldVertices/country-bolivia",
"_rev" : "_cuv9ddG---",
"name" : "Bolivia",
"type" : "country",
"code" : "BOL"
},
{
"_key" : "country-bosnia-and-herzegovina",
"_id" : "worldVertices/country-bosnia-and-herzegovina",
"_rev" : "_cuv9ddG--_",
"name" : "Bosnia and Herzegovina",
"type" : "country",
"code" : "BIH"
},
{
"_key" : "country-botswana",
"_id" : "worldVertices/country-botswana",
"_rev" : "_cuv9ddG--A",
"name" : "Botswana",
"type" : "country",
"code" : "BWA"
},
{
"_key" : "country-brazil",
"_id" : "worldVertices/country-brazil",
"_rev" : "_cuv9ddK---",
"name" : "Brazil",
"type" : "country",
"code" : "BRA"
},
{
"_key" : "country-brunei",
"_id" : "worldVertices/country-brunei",
"_rev" : "_cuv9ddK--_",
"name" : "Brunei",
"type" : "country",
"code" : "BRN"
},
{
"_key" : "country-bulgaria",
"_id" : "worldVertices/country-bulgaria",
"_rev" : "_cuv9ddK--A",
"name" : "Bulgaria",
"type" : "country",
"code" : "BGR"
},
{
"_key" : "country-burkina-faso",
"_id" : "worldVertices/country-burkina-faso",
"_rev" : "_cuv9ddO---",
"name" : "Burkina Faso",
"type" : "country",
"code" : "BFA"
},
{
"_key" : "country-burundi",
"_id" : "worldVertices/country-burundi",
"_rev" : "_cuv9ddO--_",
"name" : "Burundi",
"type" : "country",
"code" : "BDI"
},
{
"_key" : "country-cambodia",
"_id" : "worldVertices/country-cambodia",
"_rev" : "_cuv9ddO--A",
"name" : "Cambodia",
"type" : "country",
"code" : "KHM"
},
{
"_key" : "country-cameroon",
"_id" : "worldVertices/country-cameroon",
"_rev" : "_cuv9ddS---",
"name" : "Cameroon",
"type" : "country",
"code" : "CMR"
},
{
"_key" : "country-canada",
"_id" : "worldVertices/country-canada",
"_rev" : "_cuv9ddS--_",
"name" : "Canada",
"type" : "country",
"code" : "CAN"
},
{
"_key" : "country-chad",
"_id" : "worldVertices/country-chad",
"_rev" : "_cuv9ddS--A",
"name" : "Chad",
"type" : "country",
"code" : "TCD"
},
{
"_key" : "country-chile",
"_id" : "worldVertices/country-chile",
"_rev" : "_cuv9ddS--B",
"name" : "Chile",
"type" : "country",
"code" : "CHL"
},
{
"_key" : "country-colombia",
"_id" : "worldVertices/country-colombia",
"_rev" : "_cuv9ddW---",
"name" : "Colombia",
"type" : "country",
"code" : "COL"
},
{
"_key" : "country-cote-d-ivoire",
"_id" : "worldVertices/country-cote-d-ivoire",
"_rev" : "_cuv9ddW--_",
"name" : "Cote d'Ivoire",
"type" : "country",
"code" : "CIV"
},
{
"_key" : "country-croatia",
"_id" : "worldVertices/country-croatia",
"_rev" : "_cuv9ddW--A",
"name" : "Croatia",
"type" : "country",
"code" : "HRV"
},
{
"_key" : "country-czech-republic",
"_id" : "worldVertices/country-czech-republic",
"_rev" : "_cuv9dda---",
"name" : "Czech Republic",
"type" : "country",
"code" : "CZE"
},
{
"_key" : "country-denmark",
"_id" : "worldVertices/country-denmark",
"_rev" : "_cuv9dda--_",
"name" : "Denmark",
"type" : "country",
"code" : "DNK"
},
{
"_key" : "country-ecuador",
"_id" : "worldVertices/country-ecuador",
"_rev" : "_cuv9dda--A",
"name" : "Ecuador",
"type" : "country",
"code" : "ECU"
},
{
"_key" : "country-egypt",
"_id" : "worldVertices/country-egypt",
"_rev" : "_cuv9dde---",
"name" : "Egypt",
"type" : "country",
"code" : "EGY"
},
{
"_key" : "country-eritrea",
"_id" : "worldVertices/country-eritrea",
"_rev" : "_cuv9dde--_",
"name" : "Eritrea",
"type" : "country",
"code" : "ERI"
},
{
"_key" : "country-finland",
"_id" : "worldVertices/country-finland",
"_rev" : "_cuv9ddi---",
"name" : "Finland",
"type" : "country",
"code" : "FIN"
},
{
"_key" : "country-france",
"_id" : "worldVertices/country-france",
"_rev" : "_cuv9ddi--_",
"name" : "France",
"type" : "country",
"code" : "FRA"
},
{
"_key" : "country-germany",
"_id" : "worldVertices/country-germany",
"_rev" : "_cuv9ddi--A",
"name" : "Germany",
"type" : "country",
"code" : "DEU"
},
{
"_key" : "country-people-s-republic-of-china",
"_id" : "worldVertices/country-people-s-republic-of-china",
"_rev" : "_cuv9ddm---",
"name" : "People's Republic of China",
"type" : "country",
"code" : "CHN"
},
{
"_key" : "capital-algiers",
"_id" : "worldVertices/capital-algiers",
"_rev" : "_cuv9ddm--_",
"name" : "Algiers",
"type" : "capital"
},
{
"_key" : "capital-andorra-la-vella",
"_id" : "worldVertices/capital-andorra-la-vella",
"_rev" : "_cuv9ddq---",
"name" : "Andorra la Vella",
"type" : "capital"
},
{
"_key" : "capital-asmara",
"_id" : "worldVertices/capital-asmara",
"_rev" : "_cuv9ddq--_",
"name" : "Asmara",
"type" : "capital"
},
{
"_key" : "capital-bandar-seri-begawan",
"_id" : "worldVertices/capital-bandar-seri-begawan",
"_rev" : "_cuv9ddq--A",
"name" : "Bandar Seri Begawan",
"type" : "capital"
},
{
"_key" : "capital-beijing",
"_id" : "worldVertices/capital-beijing",
"_rev" : "_cuv9ddq--B",
"name" : "Beijing",
"type" : "capital"
},
{
"_key" : "capital-berlin",
"_id" : "worldVertices/capital-berlin",
"_rev" : "_cuv9ddu---",
"name" : "Berlin",
"type" : "capital"
},
{
"_key" : "capital-bogota",
"_id" : "worldVertices/capital-bogota",
"_rev" : "_cuv9ddu--_",
"name" : "Bogota",
"type" : "capital"
},
{
"_key" : "capital-brasilia",
"_id" : "worldVertices/capital-brasilia",
"_rev" : "_cuv9ddu--A",
"name" : "Brasilia",
"type" : "capital"
},
{
"_key" : "capital-bridgetown",
"_id" : "worldVertices/capital-bridgetown",
"_rev" : "_cuv9ddy---",
"name" : "Bridgetown",
"type" : "capital"
},
{
"_key" : "capital-brussels",
"_id" : "worldVertices/capital-brussels",
"_rev" : "_cuv9ddy--_",
"name" : "Brussels",
"type" : "capital"
},
{
"_key" : "capital-buenos-aires",
"_id" : "worldVertices/capital-buenos-aires",
"_rev" : "_cuv9ddy--A",
"name" : "Buenos Aires",
"type" : "capital"
},
{
"_key" : "capital-bujumbura",
"_id" : "worldVertices/capital-bujumbura",
"_rev" : "_cuv9dd2---",
"name" : "Bujumbura",
"type" : "capital"
},
{
"_key" : "capital-cairo",
"_id" : "worldVertices/capital-cairo",
"_rev" : "_cuv9dd2--_",
"name" : "Cairo",
"type" : "capital"
},
{
"_key" : "capital-canberra",
"_id" : "worldVertices/capital-canberra",
"_rev" : "_cuv9dd2--A",
"name" : "Canberra",
"type" : "capital"
},
{
"_key" : "capital-copenhagen",
"_id" : "worldVertices/capital-copenhagen",
"_rev" : "_cuv9dd6---",
"name" : "Copenhagen",
"type" : "capital"
},
{
"_key" : "capital-dhaka",
"_id" : "worldVertices/capital-dhaka",
"_rev" : "_cuv9dd6--_",
"name" : "Dhaka",
"type" : "capital"
},
{
"_key" : "capital-gaborone",
"_id" : "worldVertices/capital-gaborone",
"_rev" : "_cuv9de----",
"name" : "Gaborone",
"type" : "capital"
},
{
"_key" : "capital-helsinki",
"_id" : "worldVertices/capital-helsinki",
"_rev" : "_cuv9de---_",
"name" : "Helsinki",
"type" : "capital"
},
{
"_key" : "capital-kabul",
"_id" : "worldVertices/capital-kabul",
"_rev" : "_cuv9de---A",
"name" : "Kabul",
"type" : "capital"
},
{
"_key" : "capital-la-paz",
"_id" : "worldVertices/capital-la-paz",
"_rev" : "_cuv9deC---",
"name" : "La Paz",
"type" : "capital"
},
{
"_key" : "capital-luanda",
"_id" : "worldVertices/capital-luanda",
"_rev" : "_cuv9deC--_",
"name" : "Luanda",
"type" : "capital"
},
{
"_key" : "capital-manama",
"_id" : "worldVertices/capital-manama",
"_rev" : "_cuv9deC--A",
"name" : "Manama",
"type" : "capital"
},
{
"_key" : "capital-nassau",
"_id" : "worldVertices/capital-nassau",
"_rev" : "_cuv9deG---",
"name" : "Nassau",
"type" : "capital"
},
{
"_key" : "capital-n-djamena",
"_id" : "worldVertices/capital-n-djamena",
"_rev" : "_cuv9deG--_",
"name" : "N'Djamena",
"type" : "capital"
},
{
"_key" : "capital-ottawa",
"_id" : "worldVertices/capital-ottawa",
"_rev" : "_cuv9deG--A",
"name" : "Ottawa",
"type" : "capital"
},
{
"_key" : "capital-ouagadougou",
"_id" : "worldVertices/capital-ouagadougou",
"_rev" : "_cuv9deG--B",
"name" : "Ouagadougou",
"type" : "capital"
},
{
"_key" : "capital-paris",
"_id" : "worldVertices/capital-paris",
"_rev" : "_cuv9deK---",
"name" : "Paris",
"type" : "capital"
},
{
"_key" : "capital-phnom-penh",
"_id" : "worldVertices/capital-phnom-penh",
"_rev" : "_cuv9deK--_",
"name" : "Phnom Penh",
"type" : "capital"
},
{
"_key" : "capital-prague",
"_id" : "worldVertices/capital-prague",
"_rev" : "_cuv9deK--A",
"name" : "Prague",
"type" : "capital"
},
{
"_key" : "capital-quito",
"_id" : "worldVertices/capital-quito",
"_rev" : "_cuv9deK--B",
"name" : "Quito",
"type" : "capital"
},
{
"_key" : "capital-saint-john-s",
"_id" : "worldVertices/capital-saint-john-s",
"_rev" : "_cuv9deO---",
"name" : "Saint John's",
"type" : "capital"
},
{
"_key" : "capital-santiago",
"_id" : "worldVertices/capital-santiago",
"_rev" : "_cuv9deO--_",
"name" : "Santiago",
"type" : "capital"
},
{
"_key" : "capital-sarajevo",
"_id" : "worldVertices/capital-sarajevo",
"_rev" : "_cuv9deO--A",
"name" : "Sarajevo",
"type" : "capital"
},
{
"_key" : "capital-sofia",
"_id" : "worldVertices/capital-sofia",
"_rev" : "_cuv9deO--B",
"name" : "Sofia",
"type" : "capital"
},
{
"_key" : "capital-thimphu",
"_id" : "worldVertices/capital-thimphu",
"_rev" : "_cuv9deO--C",
"name" : "Thimphu",
"type" : "capital"
},
{
"_key" : "capital-tirana",
"_id" : "worldVertices/capital-tirana",
"_rev" : "_cuv9deS---",
"name" : "Tirana",
"type" : "capital"
},
{
"_key" : "capital-vienna",
"_id" : "worldVertices/capital-vienna",
"_rev" : "_cuv9deS--_",
"name" : "Vienna",
"type" : "capital"
},
{
"_key" : "capital-yamoussoukro",
"_id" : "worldVertices/capital-yamoussoukro",
"_rev" : "_cuv9deS--A",
"name" : "Yamoussoukro",
"type" : "capital"
},
{
"_key" : "capital-yaounde",
"_id" : "worldVertices/capital-yaounde",
"_rev" : "_cuv9deW---",
"name" : "Yaounde",
"type" : "capital"
},
{
"_key" : "capital-zagreb",
"_id" : "worldVertices/capital-zagreb",
"_rev" : "_cuv9deW--_",
"name" : "Zagreb",
"type" : "capital"
}
]
[
{
"_key" : "80381",
"_id" : "worldEdges/80381",
"_from" : "worldVertices/continent-africa",
"_to" : "worldVertices/world",
"_rev" : "_cuv9deW--A",
"type" : "is-in"
},
{
"_key" : "80383",
"_id" : "worldEdges/80383",
"_from" : "worldVertices/continent-asia",
"_to" : "worldVertices/world",
"_rev" : "_cuv9dea---",
"type" : "is-in"
},
{
"_key" : "80385",
"_id" : "worldEdges/80385",
"_from" : "worldVertices/continent-australia",
"_to" : "worldVertices/world",
"_rev" : "_cuv9dea--_",
"type" : "is-in"
},
{
"_key" : "80387",
"_id" : "worldEdges/80387",
"_from" : "worldVertices/continent-europe",
"_to" : "worldVertices/world",
"_rev" : "_cuv9dea--A",
"type" : "is-in"
},
{
"_key" : "80389",
"_id" : "worldEdges/80389",
"_from" : "worldVertices/continent-north-america",
"_to" : "worldVertices/world",
"_rev" : "_cuv9dea--B",
"type" : "is-in"
},
{
"_key" : "80391",
"_id" : "worldEdges/80391",
"_from" : "worldVertices/continent-south-america",
"_to" : "worldVertices/world",
"_rev" : "_cuv9dee---",
"type" : "is-in"
},
{
"_key" : "80393",
"_id" : "worldEdges/80393",
"_from" : "worldVertices/country-afghanistan",
"_to" : "worldVertices/continent-asia",
"_rev" : "_cuv9dee--_",
"type" : "is-in"
},
{
"_key" : "80395",
"_id" : "worldEdges/80395",
"_from" : "worldVertices/country-albania",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9dee--A",
"type" : "is-in"
},
{
"_key" : "80397",
"_id" : "worldEdges/80397",
"_from" : "worldVertices/country-algeria",
"_to" : "worldVertices/continent-africa",
"_rev" : "_cuv9dee--B",
"type" : "is-in"
},
{
"_key" : "80399",
"_id" : "worldEdges/80399",
"_from" : "worldVertices/country-andorra",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9dei---",
"type" : "is-in"
},
{
"_key" : "80401",
"_id" : "worldEdges/80401",
"_from" : "worldVertices/country-angola",
"_to" : "worldVertices/continent-africa",
"_rev" : "_cuv9dei--_",
"type" : "is-in"
},
{
"_key" : "80403",
"_id" : "worldEdges/80403",
"_from" : "worldVertices/country-antigua-and-barbuda",
"_to" : "worldVertices/continent-north-america",
"_rev" : "_cuv9dei--A",
"type" : "is-in"
},
{
"_key" : "80405",
"_id" : "worldEdges/80405",
"_from" : "worldVertices/country-argentina",
"_to" : "worldVertices/continent-south-america",
"_rev" : "_cuv9dei--B",
"type" : "is-in"
},
{
"_key" : "80407",
"_id" : "worldEdges/80407",
"_from" : "worldVertices/country-australia",
"_to" : "worldVertices/continent-australia",
"_rev" : "_cuv9dei--C",
"type" : "is-in"
},
{
"_key" : "80409",
"_id" : "worldEdges/80409",
"_from" : "worldVertices/country-austria",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9dem---",
"type" : "is-in"
},
{
"_key" : "80411",
"_id" : "worldEdges/80411",
"_from" : "worldVertices/country-bahamas",
"_to" : "worldVertices/continent-north-america",
"_rev" : "_cuv9dem--_",
"type" : "is-in"
},
{
"_key" : "80413",
"_id" : "worldEdges/80413",
"_from" : "worldVertices/country-bahrain",
"_to" : "worldVertices/continent-asia",
"_rev" : "_cuv9dem--A",
"type" : "is-in"
},
{
"_key" : "80415",
"_id" : "worldEdges/80415",
"_from" : "worldVertices/country-bangladesh",
"_to" : "worldVertices/continent-asia",
"_rev" : "_cuv9dem--B",
"type" : "is-in"
},
{
"_key" : "80417",
"_id" : "worldEdges/80417",
"_from" : "worldVertices/country-barbados",
"_to" : "worldVertices/continent-north-america",
"_rev" : "_cuv9dem--C",
"type" : "is-in"
},
{
"_key" : "80419",
"_id" : "worldEdges/80419",
"_from" : "worldVertices/country-belgium",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9dem--D",
"type" : "is-in"
},
{
"_key" : "80421",
"_id" : "worldEdges/80421",
"_from" : "worldVertices/country-bhutan",
"_to" : "worldVertices/continent-asia",
"_rev" : "_cuv9deq---",
"type" : "is-in"
},
{
"_key" : "80423",
"_id" : "worldEdges/80423",
"_from" : "worldVertices/country-bolivia",
"_to" : "worldVertices/continent-south-america",
"_rev" : "_cuv9deq--_",
"type" : "is-in"
},
{
"_key" : "80425",
"_id" : "worldEdges/80425",
"_from" : "worldVertices/country-bosnia-and-herzegovina",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9deq--A",
"type" : "is-in"
},
{
"_key" : "80427",
"_id" : "worldEdges/80427",
"_from" : "worldVertices/country-botswana",
"_to" : "worldVertices/continent-africa",
"_rev" : "_cuv9deu---",
"type" : "is-in"
},
{
"_key" : "80429",
"_id" : "worldEdges/80429",
"_from" : "worldVertices/country-brazil",
"_to" : "worldVertices/continent-south-america",
"_rev" : "_cuv9deu--_",
"type" : "is-in"
},
{
"_key" : "80431",
"_id" : "worldEdges/80431",
"_from" : "worldVertices/country-brunei",
"_to" : "worldVertices/continent-asia",
"_rev" : "_cuv9deu--A",
"type" : "is-in"
},
{
"_key" : "80433",
"_id" : "worldEdges/80433",
"_from" : "worldVertices/country-bulgaria",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9deu--B",
"type" : "is-in"
},
{
"_key" : "80435",
"_id" : "worldEdges/80435",
"_from" : "worldVertices/country-burkina-faso",
"_to" : "worldVertices/continent-africa",
"_rev" : "_cuv9deu--C",
"type" : "is-in"
},
{
"_key" : "80437",
"_id" : "worldEdges/80437",
"_from" : "worldVertices/country-burundi",
"_to" : "worldVertices/continent-africa",
"_rev" : "_cuv9dey---",
"type" : "is-in"
},
{
"_key" : "80439",
"_id" : "worldEdges/80439",
"_from" : "worldVertices/country-cambodia",
"_to" : "worldVertices/continent-asia",
"_rev" : "_cuv9dey--_",
"type" : "is-in"
},
{
"_key" : "80441",
"_id" : "worldEdges/80441",
"_from" : "worldVertices/country-cameroon",
"_to" : "worldVertices/continent-africa",
"_rev" : "_cuv9dey--A",
"type" : "is-in"
},
{
"_key" : "80443",
"_id" : "worldEdges/80443",
"_from" : "worldVertices/country-canada",
"_to" : "worldVertices/continent-north-america",
"_rev" : "_cuv9dey--B",
"type" : "is-in"
},
{
"_key" : "80445",
"_id" : "worldEdges/80445",
"_from" : "worldVertices/country-chad",
"_to" : "worldVertices/continent-africa",
"_rev" : "_cuv9de2---",
"type" : "is-in"
},
{
"_key" : "80447",
"_id" : "worldEdges/80447",
"_from" : "worldVertices/country-chile",
"_to" : "worldVertices/continent-south-america",
"_rev" : "_cuv9de2--_",
"type" : "is-in"
},
{
"_key" : "80449",
"_id" : "worldEdges/80449",
"_from" : "worldVertices/country-colombia",
"_to" : "worldVertices/continent-south-america",
"_rev" : "_cuv9de2--A",
"type" : "is-in"
},
{
"_key" : "80451",
"_id" : "worldEdges/80451",
"_from" : "worldVertices/country-cote-d-ivoire",
"_to" : "worldVertices/continent-africa",
"_rev" : "_cuv9de2--B",
"type" : "is-in"
},
{
"_key" : "80453",
"_id" : "worldEdges/80453",
"_from" : "worldVertices/country-croatia",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9de2--C",
"type" : "is-in"
},
{
"_key" : "80455",
"_id" : "worldEdges/80455",
"_from" : "worldVertices/country-czech-republic",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9de6---",
"type" : "is-in"
},
{
"_key" : "80457",
"_id" : "worldEdges/80457",
"_from" : "worldVertices/country-denmark",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9de6--_",
"type" : "is-in"
},
{
"_key" : "80459",
"_id" : "worldEdges/80459",
"_from" : "worldVertices/country-ecuador",
"_to" : "worldVertices/continent-south-america",
"_rev" : "_cuv9de6--A",
"type" : "is-in"
},
{
"_key" : "80461",
"_id" : "worldEdges/80461",
"_from" : "worldVertices/country-egypt",
"_to" : "worldVertices/continent-africa",
"_rev" : "_cuv9df----",
"type" : "is-in"
},
{
"_key" : "80463",
"_id" : "worldEdges/80463",
"_from" : "worldVertices/country-eritrea",
"_to" : "worldVertices/continent-africa",
"_rev" : "_cuv9df---_",
"type" : "is-in"
},
{
"_key" : "80465",
"_id" : "worldEdges/80465",
"_from" : "worldVertices/country-finland",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9df---A",
"type" : "is-in"
},
{
"_key" : "80467",
"_id" : "worldEdges/80467",
"_from" : "worldVertices/country-france",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9dfC---",
"type" : "is-in"
},
{
"_key" : "80469",
"_id" : "worldEdges/80469",
"_from" : "worldVertices/country-germany",
"_to" : "worldVertices/continent-europe",
"_rev" : "_cuv9dfC--_",
"type" : "is-in"
},
{
"_key" : "80471",
"_id" : "worldEdges/80471",
"_from" : "worldVertices/country-people-s-republic-of-china",
"_to" : "worldVertices/continent-asia",
"_rev" : "_cuv9dfC--A",
"type" : "is-in"
},
{
"_key" : "80473",
"_id" : "worldEdges/80473",
"_from" : "worldVertices/capital-algiers",
"_to" : "worldVertices/country-algeria",
"_rev" : "_cuv9dfG---",
"type" : "is-in"
},
{
"_key" : "80475",
"_id" : "worldEdges/80475",
"_from" : "worldVertices/capital-andorra-la-vella",
"_to" : "worldVertices/country-andorra",
"_rev" : "_cuv9dfG--_",
"type" : "is-in"
},
{
"_key" : "80477",
"_id" : "worldEdges/80477",
"_from" : "worldVertices/capital-asmara",
"_to" : "worldVertices/country-eritrea",
"_rev" : "_cuv9dfG--A",
"type" : "is-in"
},
{
"_key" : "80479",
"_id" : "worldEdges/80479",
"_from" : "worldVertices/capital-bandar-seri-begawan",
"_to" : "worldVertices/country-brunei",
"_rev" : "_cuv9dfK---",
"type" : "is-in"
},
{
"_key" : "80481",
"_id" : "worldEdges/80481",
"_from" : "worldVertices/capital-beijing",
"_to" : "worldVertices/country-people-s-republic-of-china",
"_rev" : "_cuv9dfK--_",
"type" : "is-in"
},
{
"_key" : "80483",
"_id" : "worldEdges/80483",
"_from" : "worldVertices/capital-berlin",
"_to" : "worldVertices/country-germany",
"_rev" : "_cuv9dfK--A",
"type" : "is-in"
},
{
"_key" : "80485",
"_id" : "worldEdges/80485",
"_from" : "worldVertices/capital-bogota",
"_to" : "worldVertices/country-colombia",
"_rev" : "_cuv9dfO---",
"type" : "is-in"
},
{
"_key" : "80487",
"_id" : "worldEdges/80487",
"_from" : "worldVertices/capital-brasilia",
"_to" : "worldVertices/country-brazil",
"_rev" : "_cuv9dfO--_",
"type" : "is-in"
},
{
"_key" : "80489",
"_id" : "worldEdges/80489",
"_from" : "worldVertices/capital-bridgetown",
"_to" : "worldVertices/country-barbados",
"_rev" : "_cuv9dfO--A",
"type" : "is-in"
},
{
"_key" : "80491",
"_id" : "worldEdges/80491",
"_from" : "worldVertices/capital-brussels",
"_to" : "worldVertices/country-belgium",
"_rev" : "_cuv9dfS---",
"type" : "is-in"
},
{
"_key" : "80493",
"_id" : "worldEdges/80493",
"_from" : "worldVertices/capital-buenos-aires",
"_to" : "worldVertices/country-argentina",
"_rev" : "_cuv9dfS--_",
"type" : "is-in"
},
{
"_key" : "80495",
"_id" : "worldEdges/80495",
"_from" : "worldVertices/capital-bujumbura",
"_to" : "worldVertices/country-burundi",
"_rev" : "_cuv9dfS--A",
"type" : "is-in"
},
{
"_key" : "80497",
"_id" : "worldEdges/80497",
"_from" : "worldVertices/capital-cairo",
"_to" : "worldVertices/country-egypt",
"_rev" : "_cuv9dfW---",
"type" : "is-in"
},
{
"_key" : "80499",
"_id" : "worldEdges/80499",
"_from" : "worldVertices/capital-canberra",
"_to" : "worldVertices/country-australia",
"_rev" : "_cuv9dfW--_",
"type" : "is-in"
},
{
"_key" : "80501",
"_id" : "worldEdges/80501",
"_from" : "worldVertices/capital-copenhagen",
"_to" : "worldVertices/country-denmark",
"_rev" : "_cuv9dfW--A",
"type" : "is-in"
},
{
"_key" : "80503",
"_id" : "worldEdges/80503",
"_from" : "worldVertices/capital-dhaka",
"_to" : "worldVertices/country-bangladesh",
"_rev" : "_cuv9dfa---",
"type" : "is-in"
},
{
"_key" : "80505",
"_id" : "worldEdges/80505",
"_from" : "worldVertices/capital-gaborone",
"_to" : "worldVertices/country-botswana",
"_rev" : "_cuv9dfa--_",
"type" : "is-in"
},
{
"_key" : "80507",
"_id" : "worldEdges/80507",
"_from" : "worldVertices/capital-helsinki",
"_to" : "worldVertices/country-finland",
"_rev" : "_cuv9dfa--A",
"type" : "is-in"
},
{
"_key" : "80509",
"_id" : "worldEdges/80509",
"_from" : "worldVertices/capital-kabul",
"_to" : "worldVertices/country-afghanistan",
"_rev" : "_cuv9dfe---",
"type" : "is-in"
},
{
"_key" : "80511",
"_id" : "worldEdges/80511",
"_from" : "worldVertices/capital-la-paz",
"_to" : "worldVertices/country-bolivia",
"_rev" : "_cuv9dfe--_",
"type" : "is-in"
},
{
"_key" : "80513",
"_id" : "worldEdges/80513",
"_from" : "worldVertices/capital-luanda",
"_to" : "worldVertices/country-angola",
"_rev" : "_cuv9dfe--A",
"type" : "is-in"
},
{
"_key" : "80515",
"_id" : "worldEdges/80515",
"_from" : "worldVertices/capital-manama",
"_to" : "worldVertices/country-bahrain",
"_rev" : "_cuv9dfi---",
"type" : "is-in"
},
{
"_key" : "80517",
"_id" : "worldEdges/80517",
"_from" : "worldVertices/capital-nassau",
"_to" : "worldVertices/country-bahamas",
"_rev" : "_cuv9dfi--_",
"type" : "is-in"
},
{
"_key" : "80519",
"_id" : "worldEdges/80519",
"_from" : "worldVertices/capital-n-djamena",
"_to" : "worldVertices/country-chad",
"_rev" : "_cuv9dfi--A",
"type" : "is-in"
},
{
"_key" : "80521",
"_id" : "worldEdges/80521",
"_from" : "worldVertices/capital-ottawa",
"_to" : "worldVertices/country-canada",
"_rev" : "_cuv9dfm---",
"type" : "is-in"
},
{
"_key" : "80523",
"_id" : "worldEdges/80523",
"_from" : "worldVertices/capital-ouagadougou",
"_to" : "worldVertices/country-burkina-faso",
"_rev" : "_cuv9dfm--_",
"type" : "is-in"
},
{
"_key" : "80525",
"_id" : "worldEdges/80525",
"_from" : "worldVertices/capital-paris",
"_to" : "worldVertices/country-france",
"_rev" : "_cuv9dfm--A",
"type" : "is-in"
},
{
"_key" : "80527",
"_id" : "worldEdges/80527",
"_from" : "worldVertices/capital-phnom-penh",
"_to" : "worldVertices/country-cambodia",
"_rev" : "_cuv9dfm--B",
"type" : "is-in"
},
{
"_key" : "80529",
"_id" : "worldEdges/80529",
"_from" : "worldVertices/capital-prague",
"_to" : "worldVertices/country-czech-republic",
"_rev" : "_cuv9dfq---",
"type" : "is-in"
},
{
"_key" : "80531",
"_id" : "worldEdges/80531",
"_from" : "worldVertices/capital-quito",
"_to" : "worldVertices/country-ecuador",
"_rev" : "_cuv9dfq--_",
"type" : "is-in"
},
{
"_key" : "80533",
"_id" : "worldEdges/80533",
"_from" : "worldVertices/capital-saint-john-s",
"_to" : "worldVertices/country-antigua-and-barbuda",
"_rev" : "_cuv9dfq--A",
"type" : "is-in"
},
{
"_key" : "80535",
"_id" : "worldEdges/80535",
"_from" : "worldVertices/capital-santiago",
"_to" : "worldVertices/country-chile",
"_rev" : "_cuv9dfq--B",
"type" : "is-in"
},
{
"_key" : "80537",
"_id" : "worldEdges/80537",
"_from" : "worldVertices/capital-sarajevo",
"_to" : "worldVertices/country-bosnia-and-herzegovina",
"_rev" : "_cuv9dfu---",
"type" : "is-in"
},
{
"_key" : "80539",
"_id" : "worldEdges/80539",
"_from" : "worldVertices/capital-sofia",
"_to" : "worldVertices/country-bulgaria",
"_rev" : "_cuv9dfu--_",
"type" : "is-in"
},
{
"_key" : "80541",
"_id" : "worldEdges/80541",
"_from" : "worldVertices/capital-thimphu",
"_to" : "worldVertices/country-bhutan",
"_rev" : "_cuv9dfu--A",
"type" : "is-in"
},
{
"_key" : "80543",
"_id" : "worldEdges/80543",
"_from" : "worldVertices/capital-tirana",
"_to" : "worldVertices/country-albania",
"_rev" : "_cuv9dfy---",
"type" : "is-in"
},
{
"_key" : "80545",
"_id" : "worldEdges/80545",
"_from" : "worldVertices/capital-vienna",
"_to" : "worldVertices/country-austria",
"_rev" : "_cuv9dfy--_",
"type" : "is-in"
},
{
"_key" : "80547",
"_id" : "worldEdges/80547",
"_from" : "worldVertices/capital-yamoussoukro",
"_to" : "worldVertices/country-cote-d-ivoire",
"_rev" : "_cuv9df2---",
"type" : "is-in"
},
{
"_key" : "80549",
"_id" : "worldEdges/80549",
"_from" : "worldVertices/capital-yaounde",
"_to" : "worldVertices/country-cameroon",
"_rev" : "_cuv9df2--_",
"type" : "is-in"
},
{
"_key" : "80551",
"_id" : "worldEdges/80551",
"_from" : "worldVertices/capital-zagreb",
"_to" : "worldVertices/country-croatia",
"_rev" : "_cuv9df2--A",
"type" : "is-in"
}
]
The Mps Graph
This graph was created to demonstrate a use case of the shortest path algorithm. Even though the algorithm can only determine one shortest path, it is possible to return multiple shortest paths with two separate queries. Therefore the graph is named after the multiple path search use case.
The example graph consists of vertices 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.
This is how we create it, inspect its vertices and edges, and drop it again:
arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
arangosh> var g = examples.loadGraph("mps_graph");
arangosh> db.mps_verts.toArray();
arangosh> db.mps_edges.toArray();
arangosh> examples.dropGraph("mps_graph");
Show execution results
Hide execution results
[
{
"_key" : "A",
"_id" : "mps_verts/A",
"_rev" : "_cuv9dZW---"
},
{
"_key" : "B",
"_id" : "mps_verts/B",
"_rev" : "_cuv9dZW--_"
},
{
"_key" : "C",
"_id" : "mps_verts/C",
"_rev" : "_cuv9dZW--A"
},
{
"_key" : "D",
"_id" : "mps_verts/D",
"_rev" : "_cuv9dZa---"
},
{
"_key" : "E",
"_id" : "mps_verts/E",
"_rev" : "_cuv9dZa--_"
},
{
"_key" : "F",
"_id" : "mps_verts/F",
"_rev" : "_cuv9dZa--A"
}
]
[
{
"_key" : "80101",
"_id" : "mps_edges/80101",
"_from" : "mps_verts/A",
"_to" : "mps_verts/B",
"_rev" : "_cuv9dZa--B",
"vertex" : "A"
},
{
"_key" : "80103",
"_id" : "mps_edges/80103",
"_from" : "mps_verts/A",
"_to" : "mps_verts/E",
"_rev" : "_cuv9dZe---",
"vertex" : "A"
},
{
"_key" : "80105",
"_id" : "mps_edges/80105",
"_from" : "mps_verts/A",
"_to" : "mps_verts/D",
"_rev" : "_cuv9dZe--_",
"vertex" : "A"
},
{
"_key" : "80107",
"_id" : "mps_edges/80107",
"_from" : "mps_verts/B",
"_to" : "mps_verts/C",
"_rev" : "_cuv9dZi---",
"vertex" : "B"
},
{
"_key" : "80109",
"_id" : "mps_edges/80109",
"_from" : "mps_verts/D",
"_to" : "mps_verts/C",
"_rev" : "_cuv9dZi--_",
"vertex" : "D"
},
{
"_key" : "80111",
"_id" : "mps_edges/80111",
"_from" : "mps_verts/E",
"_to" : "mps_verts/F",
"_rev" : "_cuv9dZi--A",
"vertex" : "E"
},
{
"_key" : "80113",
"_id" : "mps_edges/80113",
"_from" : "mps_verts/F",
"_to" : "mps_verts/C",
"_rev" : "_cuv9dZi--B",
"vertex" : "F"
}
]
The Connected Components Graph
A small example graph comprised of components
(vertices) and connections
(edges). Good for trying out Pregel algorithms such as Weakly Connected Components (WCC).
Also see:
arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
arangosh> var g = examples.loadGraph("connectedComponentsGraph");
arangosh> db.components.toArray();
arangosh> db.connections.toArray();
arangosh> examples.dropGraph("connectedComponentsGraph");
Show execution results
Hide execution results
[
{
"_key" : "A1",
"_id" : "components/A1",
"_rev" : "_cuv9dRu---"
},
{
"_key" : "A2",
"_id" : "components/A2",
"_rev" : "_cuv9dRy---"
},
{
"_key" : "A3",
"_id" : "components/A3",
"_rev" : "_cuv9dRy--_"
},
{
"_key" : "A4",
"_id" : "components/A4",
"_rev" : "_cuv9dR2---"
},
{
"_key" : "B1",
"_id" : "components/B1",
"_rev" : "_cuv9dR2--_"
},
{
"_key" : "B3",
"_id" : "components/B3",
"_rev" : "_cuv9dR2--A"
},
{
"_key" : "B2",
"_id" : "components/B2",
"_rev" : "_cuv9dR6---"
},
{
"_key" : "B4",
"_id" : "components/B4",
"_rev" : "_cuv9dR6--_"
},
{
"_key" : "B6",
"_id" : "components/B6",
"_rev" : "_cuv9dS----"
},
{
"_key" : "B5",
"_id" : "components/B5",
"_rev" : "_cuv9dS---_"
},
{
"_key" : "B7",
"_id" : "components/B7",
"_rev" : "_cuv9dS---A"
},
{
"_key" : "B8",
"_id" : "components/B8",
"_rev" : "_cuv9dS---B"
},
{
"_key" : "B9",
"_id" : "components/B9",
"_rev" : "_cuv9dSC---"
},
{
"_key" : "B10",
"_id" : "components/B10",
"_rev" : "_cuv9dSC--_"
},
{
"_key" : "B19",
"_id" : "components/B19",
"_rev" : "_cuv9dSG---"
},
{
"_key" : "B11",
"_id" : "components/B11",
"_rev" : "_cuv9dSG--_"
},
{
"_key" : "B12",
"_id" : "components/B12",
"_rev" : "_cuv9dSG--A"
},
{
"_key" : "B13",
"_id" : "components/B13",
"_rev" : "_cuv9dSG--B"
},
{
"_key" : "B20",
"_id" : "components/B20",
"_rev" : "_cuv9dSK---"
},
{
"_key" : "B14",
"_id" : "components/B14",
"_rev" : "_cuv9dSK--_"
},
{
"_key" : "B15",
"_id" : "components/B15",
"_rev" : "_cuv9dSK--A"
},
{
"_key" : "B16",
"_id" : "components/B16",
"_rev" : "_cuv9dSO---"
},
{
"_key" : "B17",
"_id" : "components/B17",
"_rev" : "_cuv9dSO--_"
},
{
"_key" : "B18",
"_id" : "components/B18",
"_rev" : "_cuv9dSO--A"
},
{
"_key" : "B21",
"_id" : "components/B21",
"_rev" : "_cuv9dSS---"
},
{
"_key" : "B22",
"_id" : "components/B22",
"_rev" : "_cuv9dSS--_"
},
{
"_key" : "C1",
"_id" : "components/C1",
"_rev" : "_cuv9dSS--A"
},
{
"_key" : "C2",
"_id" : "components/C2",
"_rev" : "_cuv9dSW---"
},
{
"_key" : "C3",
"_id" : "components/C3",
"_rev" : "_cuv9dSW--_"
},
{
"_key" : "C4",
"_id" : "components/C4",
"_rev" : "_cuv9dSW--A"
},
{
"_key" : "C5",
"_id" : "components/C5",
"_rev" : "_cuv9dSa---"
},
{
"_key" : "C7",
"_id" : "components/C7",
"_rev" : "_cuv9dSa--_"
},
{
"_key" : "C6",
"_id" : "components/C6",
"_rev" : "_cuv9dSe---"
},
{
"_key" : "C8",
"_id" : "components/C8",
"_rev" : "_cuv9dSe--_"
},
{
"_key" : "C9",
"_id" : "components/C9",
"_rev" : "_cuv9dSi---"
},
{
"_key" : "C10",
"_id" : "components/C10",
"_rev" : "_cuv9dSi--_"
}
]
[
{
"_key" : "79798",
"_id" : "connections/79798",
"_from" : "components/A1",
"_to" : "components/A2",
"_rev" : "_cuv9dSi--A"
},
{
"_key" : "79800",
"_id" : "connections/79800",
"_from" : "components/A2",
"_to" : "components/A3",
"_rev" : "_cuv9dSm---"
},
{
"_key" : "79802",
"_id" : "connections/79802",
"_from" : "components/A3",
"_to" : "components/A4",
"_rev" : "_cuv9dSm--_"
},
{
"_key" : "79804",
"_id" : "connections/79804",
"_from" : "components/A4",
"_to" : "components/A1",
"_rev" : "_cuv9dSq---"
},
{
"_key" : "79806",
"_id" : "connections/79806",
"_from" : "components/B1",
"_to" : "components/B3",
"_rev" : "_cuv9dSq--_"
},
{
"_key" : "79808",
"_id" : "connections/79808",
"_from" : "components/B2",
"_to" : "components/B4",
"_rev" : "_cuv9dSu---"
},
{
"_key" : "79810",
"_id" : "connections/79810",
"_from" : "components/B3",
"_to" : "components/B6",
"_rev" : "_cuv9dSu--_"
},
{
"_key" : "79812",
"_id" : "connections/79812",
"_from" : "components/B4",
"_to" : "components/B3",
"_rev" : "_cuv9dSy---"
},
{
"_key" : "79814",
"_id" : "connections/79814",
"_from" : "components/B4",
"_to" : "components/B5",
"_rev" : "_cuv9dSy--_"
},
{
"_key" : "79816",
"_id" : "connections/79816",
"_from" : "components/B6",
"_to" : "components/B7",
"_rev" : "_cuv9dS2---"
},
{
"_key" : "79818",
"_id" : "connections/79818",
"_from" : "components/B7",
"_to" : "components/B8",
"_rev" : "_cuv9dS2--_"
},
{
"_key" : "79820",
"_id" : "connections/79820",
"_from" : "components/B7",
"_to" : "components/B9",
"_rev" : "_cuv9dS2--A"
},
{
"_key" : "79822",
"_id" : "connections/79822",
"_from" : "components/B7",
"_to" : "components/B10",
"_rev" : "_cuv9dS6---"
},
{
"_key" : "79824",
"_id" : "connections/79824",
"_from" : "components/B7",
"_to" : "components/B19",
"_rev" : "_cuv9dS6--_"
},
{
"_key" : "79826",
"_id" : "connections/79826",
"_from" : "components/B11",
"_to" : "components/B10",
"_rev" : "_cuv9dT----"
},
{
"_key" : "79828",
"_id" : "connections/79828",
"_from" : "components/B12",
"_to" : "components/B11",
"_rev" : "_cuv9dT---_"
},
{
"_key" : "79830",
"_id" : "connections/79830",
"_from" : "components/B13",
"_to" : "components/B12",
"_rev" : "_cuv9dT---A"
},
{
"_key" : "79832",
"_id" : "connections/79832",
"_from" : "components/B13",
"_to" : "components/B20",
"_rev" : "_cuv9dTC---"
},
{
"_key" : "79834",
"_id" : "connections/79834",
"_from" : "components/B14",
"_to" : "components/B13",
"_rev" : "_cuv9dTC--_"
},
{
"_key" : "79836",
"_id" : "connections/79836",
"_from" : "components/B15",
"_to" : "components/B14",
"_rev" : "_cuv9dTG---"
},
{
"_key" : "79838",
"_id" : "connections/79838",
"_from" : "components/B15",
"_to" : "components/B16",
"_rev" : "_cuv9dTG--_"
},
{
"_key" : "79840",
"_id" : "connections/79840",
"_from" : "components/B17",
"_to" : "components/B15",
"_rev" : "_cuv9dTG--A"
},
{
"_key" : "79842",
"_id" : "connections/79842",
"_from" : "components/B17",
"_to" : "components/B18",
"_rev" : "_cuv9dTK---"
},
{
"_key" : "79844",
"_id" : "connections/79844",
"_from" : "components/B19",
"_to" : "components/B17",
"_rev" : "_cuv9dTK--_"
},
{
"_key" : "79846",
"_id" : "connections/79846",
"_from" : "components/B20",
"_to" : "components/B21",
"_rev" : "_cuv9dTK--A"
},
{
"_key" : "79848",
"_id" : "connections/79848",
"_from" : "components/B20",
"_to" : "components/B22",
"_rev" : "_cuv9dTK--B"
},
{
"_key" : "79850",
"_id" : "connections/79850",
"_from" : "components/C1",
"_to" : "components/C2",
"_rev" : "_cuv9dTO---"
},
{
"_key" : "79852",
"_id" : "connections/79852",
"_from" : "components/C2",
"_to" : "components/C3",
"_rev" : "_cuv9dTO--_"
},
{
"_key" : "79854",
"_id" : "connections/79854",
"_from" : "components/C3",
"_to" : "components/C4",
"_rev" : "_cuv9dTO--A"
},
{
"_key" : "79856",
"_id" : "connections/79856",
"_from" : "components/C4",
"_to" : "components/C5",
"_rev" : "_cuv9dTO--B"
},
{
"_key" : "79858",
"_id" : "connections/79858",
"_from" : "components/C4",
"_to" : "components/C7",
"_rev" : "_cuv9dTO--C"
},
{
"_key" : "79860",
"_id" : "connections/79860",
"_from" : "components/C5",
"_to" : "components/C6",
"_rev" : "_cuv9dTS---"
},
{
"_key" : "79862",
"_id" : "connections/79862",
"_from" : "components/C5",
"_to" : "components/C7",
"_rev" : "_cuv9dTS--_"
},
{
"_key" : "79864",
"_id" : "connections/79864",
"_from" : "components/C7",
"_to" : "components/C8",
"_rev" : "_cuv9dTS--A"
},
{
"_key" : "79866",
"_id" : "connections/79866",
"_from" : "components/C8",
"_to" : "components/C9",
"_rev" : "_cuv9dTS--B"
},
{
"_key" : "79868",
"_id" : "connections/79868",
"_from" : "components/C8",
"_to" : "components/C10",
"_rev" : "_cuv9dTW---"
}
]
Higher volume graph examples
All of the above examples are rather small so they are easier to comprehend and can demonstrate the way the functionality works. There are however several datasets freely available on the web that are a lot bigger. We collected some of them with import scripts so you may play around with them. Another huge graph is the Pokec social network from Slovakia that we used for performance testing on several databases; You will find importing scripts etc. in this blogpost.