- ArangoDB Graphs
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 freshersand 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 Smart Graph implementation, for scalable graphs
- Smart Graph 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 definitionsYour 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. FILTERs 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 bean 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 differenttypes 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 oneach traversed edge, which may become CPU-intense. When not finding the edges in the first place because of thecollection containing them is not traversed at all, there will never be a reason to actually check for theirtype
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 limitedto cap the resource requirements. You may also have constraints on other edge attributes, such as a hash indexwith 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, otherwisethe FILTER
approach is preferred. You can still use FILTER
operations on edges of course. You can get ridof 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 havean edge collection per relation type.
ArangoDB does not require you to store your data in graph structures with edges and vertices, you can also decideto embed attributes such as which groups a user is part of, or id
s of documents in another document instead ofconnecting the documents with edges. It can be a meaningful performance optimization for _1:n relationships, ifyour data is not focused on relations and you don’t need graph traversal with varying depth. It usually meansto 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 attributesof the Group, i.e. when it was founded, its subject, an icon URL and so on. Users
documents contain the data specific to auser - 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 arbitrarynumber of groups, this is an m:n relation. The edge collection can be called UsersInGroups
with i.e. one edgewith _from
pointing to Users/John
and _to
pointing to Groups/BowlingGroupHappyPin
. This makes the user Johna 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 anarbitrary number. Edges can be traversed in both directions, so it’s easy to determine allgroups a user is in, but also to find out which members a certain group has. Users could also beinterconnected 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 veryflexible 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 BobThis 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
- [
- {
- "_key" : "alice",
- "_id" : "persons/alice",
- "_rev" : "_ZJNT-Py---",
- "name" : "Alice"
- },
- {
- "_key" : "bob",
- "_id" : "persons/bob",
- "_rev" : "_ZJNT-P2---",
- "name" : "Bob"
- },
- {
- "_key" : "charlie",
- "_id" : "persons/charlie",
- "_rev" : "_ZJNT-P2--A",
- "name" : "Charlie"
- },
- {
- "_key" : "dave",
- "_id" : "persons/dave",
- "_rev" : "_ZJNT-P2--C",
- "name" : "Dave"
- },
- {
- "_key" : "eve",
- "_id" : "persons/eve",
- "_rev" : "_ZJNT-P6---",
- "name" : "Eve"
- }
- ]
- [
- {
- "_key" : "87573",
- "_id" : "knows/87573",
- "_from" : "persons/alice",
- "_to" : "persons/bob",
- "_rev" : "_ZJNT-P6--A",
- "vertex" : "alice"
- },
- {
- "_key" : "87575",
- "_id" : "knows/87575",
- "_from" : "persons/bob",
- "_to" : "persons/charlie",
- "_rev" : "_ZJNT-P6--C",
- "vertex" : "bob"
- },
- {
- "_key" : "87577",
- "_id" : "knows/87577",
- "_from" : "persons/bob",
- "_to" : "persons/dave",
- "_rev" : "_ZJNT-Q----",
- "vertex" : "bob"
- },
- {
- "_key" : "87579",
- "_id" : "knows/87579",
- "_from" : "persons/eve",
- "_to" : "persons/alice",
- "_rev" : "_ZJNT-Q---A",
- "vertex" : "eve"
- },
- {
- "_key" : "87581",
- "_id" : "knows/87581",
- "_from" : "persons/eve",
- "_to" : "persons/bob",
- "_rev" : "_ZJNT-Q---C",
- "vertex" : "eve"
- }
- ]
Hide execution results
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
- [
- {
- "_key" : "alice",
- "_id" : "female/alice",
- "_rev" : "_ZJNT-Te---",
- "name" : "Alice"
- },
- {
- "_key" : "diana",
- "_id" : "female/diana",
- "_rev" : "_ZJNT-Ti---",
- "name" : "Diana"
- }
- ]
- [
- {
- "_key" : "bob",
- "_id" : "male/bob",
- "_rev" : "_ZJNT-Te--A",
- "name" : "Bob"
- },
- {
- "_key" : "charly",
- "_id" : "male/charly",
- "_rev" : "_ZJNT-Te--C",
- "name" : "Charly"
- }
- ]
- [
- {
- "_key" : "87783",
- "_id" : "relation/87783",
- "_from" : "female/alice",
- "_to" : "male/bob",
- "_rev" : "_ZJNT-Ti--A",
- "type" : "married",
- "vertex" : "alice"
- },
- {
- "_key" : "87785",
- "_id" : "relation/87785",
- "_from" : "female/alice",
- "_to" : "male/charly",
- "_rev" : "_ZJNT-Ti--C",
- "type" : "friend",
- "vertex" : "alice"
- },
- {
- "_key" : "87787",
- "_id" : "relation/87787",
- "_from" : "male/charly",
- "_to" : "female/diana",
- "_rev" : "_ZJNT-Ti--E",
- "type" : "married",
- "vertex" : "charly"
- },
- {
- "_key" : "87789",
- "_id" : "relation/87789",
- "_from" : "male/bob",
- "_to" : "female/diana",
- "_rev" : "_ZJNT-Tm---",
- "type" : "friend",
- "vertex" : "bob"
- }
- ]
Hide execution results
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
- [
- {
- "_key" : "Lyon",
- "_id" : "frenchCity/Lyon",
- "_rev" : "_ZJNT-Om--A",
- "population" : 80000,
- "isCapital" : false,
- "geometry" : {
- "type" : "Point",
- "coordinates" : [
- 4.84,
- 45.76
- ]
- }
- },
- {
- "_key" : "Paris",
- "_id" : "frenchCity/Paris",
- "_rev" : "_ZJNT-Om--C",
- "population" : 4000000,
- "isCapital" : true,
- "geometry" : {
- "type" : "Point",
- "coordinates" : [
- 2.3508,
- 48.8567
- ]
- }
- }
- ]
- [
- {
- "_key" : "Berlin",
- "_id" : "germanCity/Berlin",
- "_rev" : "_ZJNT-Oi---",
- "population" : 3000000,
- "isCapital" : true,
- "geometry" : {
- "type" : "Point",
- "coordinates" : [
- 13.3833,
- 52.5167
- ]
- }
- },
- {
- "_key" : "Cologne",
- "_id" : "germanCity/Cologne",
- "_rev" : "_ZJNT-Oi--A",
- "population" : 1000000,
- "isCapital" : false,
- "geometry" : {
- "type" : "Point",
- "coordinates" : [
- 6.9528,
- 50.9364
- ]
- }
- },
- {
- "_key" : "Hamburg",
- "_id" : "germanCity/Hamburg",
- "_rev" : "_ZJNT-Om---",
- "population" : 1000000,
- "isCapital" : false,
- "geometry" : {
- "type" : "Point",
- "coordinates" : [
- 10.0014,
- 53.5653
- ]
- }
- }
- ]
- [
- {
- "_key" : "87510",
- "_id" : "germanHighway/87510",
- "_from" : "germanCity/Berlin",
- "_to" : "germanCity/Cologne",
- "_rev" : "_ZJNT-Oq--_",
- "distance" : 850
- },
- {
- "_key" : "87512",
- "_id" : "germanHighway/87512",
- "_from" : "germanCity/Berlin",
- "_to" : "germanCity/Hamburg",
- "_rev" : "_ZJNT-Ou---",
- "distance" : 400
- },
- {
- "_key" : "87514",
- "_id" : "germanHighway/87514",
- "_from" : "germanCity/Hamburg",
- "_to" : "germanCity/Cologne",
- "_rev" : "_ZJNT-Ou--A",
- "distance" : 500
- }
- ]
- [
- {
- "_key" : "87516",
- "_id" : "frenchHighway/87516",
- "_from" : "frenchCity/Paris",
- "_to" : "frenchCity/Lyon",
- "_rev" : "_ZJNT-Ou--C",
- "distance" : 550
- }
- ]
- [
- {
- "_key" : "87518",
- "_id" : "internationalHighway/87518",
- "_from" : "germanCity/Berlin",
- "_to" : "frenchCity/Lyon",
- "_rev" : "_ZJNT-Oy---",
- "distance" : 1100
- },
- {
- "_key" : "87520",
- "_id" : "internationalHighway/87520",
- "_from" : "germanCity/Berlin",
- "_to" : "frenchCity/Paris",
- "_rev" : "_ZJNT-Oy--A",
- "distance" : 1200
- },
- {
- "_key" : "87522",
- "_id" : "internationalHighway/87522",
- "_from" : "germanCity/Hamburg",
- "_to" : "frenchCity/Paris",
- "_rev" : "_ZJNT-Oy--C",
- "distance" : 900
- },
- {
- "_key" : "87524",
- "_id" : "internationalHighway/87524",
- "_from" : "germanCity/Hamburg",
- "_to" : "frenchCity/Lyon",
- "_rev" : "_ZJNT-Oy--E",
- "distance" : 1300
- },
- {
- "_key" : "87526",
- "_id" : "internationalHighway/87526",
- "_from" : "germanCity/Cologne",
- "_to" : "frenchCity/Lyon",
- "_rev" : "_ZJNT-O2---",
- "distance" : 700
- },
- {
- "_key" : "87528",
- "_id" : "internationalHighway/87528",
- "_from" : "germanCity/Cologne",
- "_to" : "frenchCity/Paris",
- "_rev" : "_ZJNT-O2--A",
- "distance" : 550
- }
- ]
Hide execution results
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
- [
- {
- "_key" : "A",
- "_id" : "circles/A",
- "_rev" : "_ZJNT-UO---",
- "label" : "1"
- },
- {
- "_key" : "B",
- "_id" : "circles/B",
- "_rev" : "_ZJNT-UO--A",
- "label" : "2"
- },
- {
- "_key" : "C",
- "_id" : "circles/C",
- "_rev" : "_ZJNT-US---",
- "label" : "3"
- },
- {
- "_key" : "D",
- "_id" : "circles/D",
- "_rev" : "_ZJNT-US--A",
- "label" : "4"
- },
- {
- "_key" : "E",
- "_id" : "circles/E",
- "_rev" : "_ZJNT-US--C",
- "label" : "5"
- },
- {
- "_key" : "F",
- "_id" : "circles/F",
- "_rev" : "_ZJNT-US--E",
- "label" : "6"
- },
- {
- "_key" : "G",
- "_id" : "circles/G",
- "_rev" : "_ZJNT-UW---",
- "label" : "7"
- },
- {
- "_key" : "H",
- "_id" : "circles/H",
- "_rev" : "_ZJNT-UW--A",
- "label" : "8"
- },
- {
- "_key" : "I",
- "_id" : "circles/I",
- "_rev" : "_ZJNT-UW--C",
- "label" : "9"
- },
- {
- "_key" : "J",
- "_id" : "circles/J",
- "_rev" : "_ZJNT-UW--E",
- "label" : "10"
- },
- {
- "_key" : "K",
- "_id" : "circles/K",
- "_rev" : "_ZJNT-Ua---",
- "label" : "11"
- }
- ]
- [
- {
- "_key" : "87832",
- "_id" : "edges/87832",
- "_from" : "circles/A",
- "_to" : "circles/B",
- "_rev" : "_ZJNT-Ua--A",
- "theFalse" : false,
- "theTruth" : true,
- "label" : "left_bar"
- },
- {
- "_key" : "87834",
- "_id" : "edges/87834",
- "_from" : "circles/B",
- "_to" : "circles/C",
- "_rev" : "_ZJNT-Ua--C",
- "theFalse" : false,
- "theTruth" : true,
- "label" : "left_blarg"
- },
- {
- "_key" : "87836",
- "_id" : "edges/87836",
- "_from" : "circles/C",
- "_to" : "circles/D",
- "_rev" : "_ZJNT-Ua--E",
- "theFalse" : false,
- "theTruth" : true,
- "label" : "left_blorg"
- },
- {
- "_key" : "87838",
- "_id" : "edges/87838",
- "_from" : "circles/B",
- "_to" : "circles/E",
- "_rev" : "_ZJNT-Ue---",
- "theFalse" : false,
- "theTruth" : true,
- "label" : "left_blub"
- },
- {
- "_key" : "87840",
- "_id" : "edges/87840",
- "_from" : "circles/E",
- "_to" : "circles/F",
- "_rev" : "_ZJNT-Ue--A",
- "theFalse" : false,
- "theTruth" : true,
- "label" : "left_schubi"
- },
- {
- "_key" : "87842",
- "_id" : "edges/87842",
- "_from" : "circles/A",
- "_to" : "circles/G",
- "_rev" : "_ZJNT-Ue--C",
- "theFalse" : false,
- "theTruth" : true,
- "label" : "right_foo"
- },
- {
- "_key" : "87844",
- "_id" : "edges/87844",
- "_from" : "circles/G",
- "_to" : "circles/H",
- "_rev" : "_ZJNT-Ue--E",
- "theFalse" : false,
- "theTruth" : true,
- "label" : "right_blob"
- },
- {
- "_key" : "87846",
- "_id" : "edges/87846",
- "_from" : "circles/H",
- "_to" : "circles/I",
- "_rev" : "_ZJNT-Ui---",
- "theFalse" : false,
- "theTruth" : true,
- "label" : "right_blub"
- },
- {
- "_key" : "87848",
- "_id" : "edges/87848",
- "_from" : "circles/G",
- "_to" : "circles/J",
- "_rev" : "_ZJNT-Ui--A",
- "theFalse" : false,
- "theTruth" : true,
- "label" : "right_zip"
- },
- {
- "_key" : "87850",
- "_id" : "edges/87850",
- "_from" : "circles/J",
- "_to" : "circles/K",
- "_rev" : "_ZJNT-Ui--C",
- "theFalse" : false,
- "theTruth" : true,
- "label" : "right_zup"
- }
- ]
Hide execution results
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 andNorth 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
- [
- {
- "_key" : "Inverness",
- "_id" : "places/Inverness",
- "_rev" : "_ZJNT-Qi---",
- "label" : "Inverness"
- },
- {
- "_key" : "Aberdeen",
- "_id" : "places/Aberdeen",
- "_rev" : "_ZJNT-Qi--A",
- "label" : "Aberdeen"
- },
- {
- "_key" : "Leuchars",
- "_id" : "places/Leuchars",
- "_rev" : "_ZJNT-Qm---",
- "label" : "Leuchars"
- },
- {
- "_key" : "StAndrews",
- "_id" : "places/StAndrews",
- "_rev" : "_ZJNT-Qm--A",
- "label" : "StAndrews"
- },
- {
- "_key" : "Edinburgh",
- "_id" : "places/Edinburgh",
- "_rev" : "_ZJNT-Qm--C",
- "label" : "Edinburgh"
- },
- {
- "_key" : "Glasgow",
- "_id" : "places/Glasgow",
- "_rev" : "_ZJNT-Qm--E",
- "label" : "Glasgow"
- },
- {
- "_key" : "York",
- "_id" : "places/York",
- "_rev" : "_ZJNT-Qm--G",
- "label" : "York"
- },
- {
- "_key" : "Carlisle",
- "_id" : "places/Carlisle",
- "_rev" : "_ZJNT-Qq---",
- "label" : "Carlisle"
- },
- {
- "_key" : "Birmingham",
- "_id" : "places/Birmingham",
- "_rev" : "_ZJNT-Qq--A",
- "label" : "Birmingham"
- },
- {
- "_key" : "London",
- "_id" : "places/London",
- "_rev" : "_ZJNT-Qq--C",
- "label" : "London"
- },
- {
- "_key" : "Brussels",
- "_id" : "places/Brussels",
- "_rev" : "_ZJNT-Qq--E",
- "label" : "Brussels"
- },
- {
- "_key" : "Cologne",
- "_id" : "places/Cologne",
- "_rev" : "_ZJNT-Qu---",
- "label" : "Cologne"
- },
- {
- "_key" : "Toronto",
- "_id" : "places/Toronto",
- "_rev" : "_ZJNT-Qu--A",
- "label" : "Toronto"
- },
- {
- "_key" : "Winnipeg",
- "_id" : "places/Winnipeg",
- "_rev" : "_ZJNT-Qu--C",
- "label" : "Winnipeg"
- },
- {
- "_key" : "Saskatoon",
- "_id" : "places/Saskatoon",
- "_rev" : "_ZJNT-Qu--E",
- "label" : "Saskatoon"
- },
- {
- "_key" : "Edmonton",
- "_id" : "places/Edmonton",
- "_rev" : "_ZJNT-Qy---",
- "label" : "Edmonton"
- },
- {
- "_key" : "Jasper",
- "_id" : "places/Jasper",
- "_rev" : "_ZJNT-Qy--A",
- "label" : "Jasper"
- },
- {
- "_key" : "Vancouver",
- "_id" : "places/Vancouver",
- "_rev" : "_ZJNT-Qy--C",
- "label" : "Vancouver"
- }
- ]
- [
- {
- "_key" : "87627",
- "_id" : "connections/87627",
- "_from" : "places/Inverness",
- "_to" : "places/Aberdeen",
- "_rev" : "_ZJNT-Qy--E",
- "travelTime" : 3
- },
- {
- "_key" : "87629",
- "_id" : "connections/87629",
- "_from" : "places/Aberdeen",
- "_to" : "places/Inverness",
- "_rev" : "_ZJNT-Q2---",
- "travelTime" : 2.5
- },
- {
- "_key" : "87631",
- "_id" : "connections/87631",
- "_from" : "places/Aberdeen",
- "_to" : "places/Leuchars",
- "_rev" : "_ZJNT-Q2--A",
- "travelTime" : 1.5
- },
- {
- "_key" : "87633",
- "_id" : "connections/87633",
- "_from" : "places/Leuchars",
- "_to" : "places/Aberdeen",
- "_rev" : "_ZJNT-Q2--C",
- "travelTime" : 1
- },
- {
- "_key" : "87635",
- "_id" : "connections/87635",
- "_from" : "places/Leuchars",
- "_to" : "places/Edinburgh",
- "_rev" : "_ZJNT-Q2--E",
- "travelTime" : 1.5
- },
- {
- "_key" : "87637",
- "_id" : "connections/87637",
- "_from" : "places/Edinburgh",
- "_to" : "places/Leuchars",
- "_rev" : "_ZJNT-Q6---",
- "travelTime" : 3
- },
- {
- "_key" : "87639",
- "_id" : "connections/87639",
- "_from" : "places/Edinburgh",
- "_to" : "places/Glasgow",
- "_rev" : "_ZJNT-Q6--A",
- "travelTime" : 1
- },
- {
- "_key" : "87641",
- "_id" : "connections/87641",
- "_from" : "places/Glasgow",
- "_to" : "places/Edinburgh",
- "_rev" : "_ZJNT-Q6--C",
- "travelTime" : 1
- },
- {
- "_key" : "87643",
- "_id" : "connections/87643",
- "_from" : "places/Edinburgh",
- "_to" : "places/York",
- "_rev" : "_ZJNT-Q6--E",
- "travelTime" : 3.5
- },
- {
- "_key" : "87645",
- "_id" : "connections/87645",
- "_from" : "places/York",
- "_to" : "places/Edinburgh",
- "_rev" : "_ZJNT-R----",
- "travelTime" : 4
- },
- {
- "_key" : "87647",
- "_id" : "connections/87647",
- "_from" : "places/Glasgow",
- "_to" : "places/Carlisle",
- "_rev" : "_ZJNT-R---A",
- "travelTime" : 1
- },
- {
- "_key" : "87649",
- "_id" : "connections/87649",
- "_from" : "places/Carlisle",
- "_to" : "places/Glasgow",
- "_rev" : "_ZJNT-R---C",
- "travelTime" : 1
- },
- {
- "_key" : "87651",
- "_id" : "connections/87651",
- "_from" : "places/Carlisle",
- "_to" : "places/York",
- "_rev" : "_ZJNT-R---E",
- "travelTime" : 2.5
- },
- {
- "_key" : "87653",
- "_id" : "connections/87653",
- "_from" : "places/York",
- "_to" : "places/Carlisle",
- "_rev" : "_ZJNT-RC---",
- "travelTime" : 3.5
- },
- {
- "_key" : "87655",
- "_id" : "connections/87655",
- "_from" : "places/Carlisle",
- "_to" : "places/Birmingham",
- "_rev" : "_ZJNT-RC--A",
- "travelTime" : 2
- },
- {
- "_key" : "87657",
- "_id" : "connections/87657",
- "_from" : "places/Birmingham",
- "_to" : "places/Carlisle",
- "_rev" : "_ZJNT-RC--C",
- "travelTime" : 1
- },
- {
- "_key" : "87659",
- "_id" : "connections/87659",
- "_from" : "places/Birmingham",
- "_to" : "places/London",
- "_rev" : "_ZJNT-RC--E",
- "travelTime" : 1.5
- },
- {
- "_key" : "87661",
- "_id" : "connections/87661",
- "_from" : "places/London",
- "_to" : "places/Birmingham",
- "_rev" : "_ZJNT-RG---",
- "travelTime" : 2.5
- },
- {
- "_key" : "87663",
- "_id" : "connections/87663",
- "_from" : "places/Leuchars",
- "_to" : "places/StAndrews",
- "_rev" : "_ZJNT-RG--A",
- "travelTime" : 0.2
- },
- {
- "_key" : "87665",
- "_id" : "connections/87665",
- "_from" : "places/StAndrews",
- "_to" : "places/Leuchars",
- "_rev" : "_ZJNT-RG--C",
- "travelTime" : 0.2
- },
- {
- "_key" : "87667",
- "_id" : "connections/87667",
- "_from" : "places/York",
- "_to" : "places/London",
- "_rev" : "_ZJNT-RG--E",
- "travelTime" : 1.8
- },
- {
- "_key" : "87669",
- "_id" : "connections/87669",
- "_from" : "places/London",
- "_to" : "places/York",
- "_rev" : "_ZJNT-RK---",
- "travelTime" : 2
- },
- {
- "_key" : "87671",
- "_id" : "connections/87671",
- "_from" : "places/London",
- "_to" : "places/Brussels",
- "_rev" : "_ZJNT-RK--A",
- "travelTime" : 2.5
- },
- {
- "_key" : "87673",
- "_id" : "connections/87673",
- "_from" : "places/Brussels",
- "_to" : "places/London",
- "_rev" : "_ZJNT-RK--C",
- "travelTime" : 3.5
- },
- {
- "_key" : "87675",
- "_id" : "connections/87675",
- "_from" : "places/Brussels",
- "_to" : "places/Cologne",
- "_rev" : "_ZJNT-RK--E",
- "travelTime" : 2
- },
- {
- "_key" : "87677",
- "_id" : "connections/87677",
- "_from" : "places/Cologne",
- "_to" : "places/Brussels",
- "_rev" : "_ZJNT-RO---",
- "travelTime" : 1.5
- },
- {
- "_key" : "87679",
- "_id" : "connections/87679",
- "_from" : "places/Toronto",
- "_to" : "places/Winnipeg",
- "_rev" : "_ZJNT-RO--A",
- "travelTime" : 36
- },
- {
- "_key" : "87681",
- "_id" : "connections/87681",
- "_from" : "places/Winnipeg",
- "_to" : "places/Toronto",
- "_rev" : "_ZJNT-RO--C",
- "travelTime" : 35
- },
- {
- "_key" : "87683",
- "_id" : "connections/87683",
- "_from" : "places/Winnipeg",
- "_to" : "places/Saskatoon",
- "_rev" : "_ZJNT-RO--E",
- "travelTime" : 12
- },
- {
- "_key" : "87685",
- "_id" : "connections/87685",
- "_from" : "places/Saskatoon",
- "_to" : "places/Winnipeg",
- "_rev" : "_ZJNT-RS---",
- "travelTime" : 5
- },
- {
- "_key" : "87687",
- "_id" : "connections/87687",
- "_from" : "places/Saskatoon",
- "_to" : "places/Edmonton",
- "_rev" : "_ZJNT-RS--A",
- "travelTime" : 12
- },
- {
- "_key" : "87689",
- "_id" : "connections/87689",
- "_from" : "places/Edmonton",
- "_to" : "places/Saskatoon",
- "_rev" : "_ZJNT-RS--C",
- "travelTime" : 17
- },
- {
- "_key" : "87691",
- "_id" : "connections/87691",
- "_from" : "places/Edmonton",
- "_to" : "places/Jasper",
- "_rev" : "_ZJNT-RW---",
- "travelTime" : 6
- },
- {
- "_key" : "87693",
- "_id" : "connections/87693",
- "_from" : "places/Jasper",
- "_to" : "places/Edmonton",
- "_rev" : "_ZJNT-RW--A",
- "travelTime" : 5
- },
- {
- "_key" : "87695",
- "_id" : "connections/87695",
- "_from" : "places/Jasper",
- "_to" : "places/Vancouver",
- "_rev" : "_ZJNT-RW--C",
- "travelTime" : 12
- },
- {
- "_key" : "87697",
- "_id" : "connections/87697",
- "_from" : "places/Vancouver",
- "_to" : "places/Jasper",
- "_rev" : "_ZJNT-RW--E",
- "travelTime" : 13
- }
- ]
Hide execution results
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
- [
- {
- "_key" : "world",
- "_id" : "worldVertices/world",
- "_rev" : "_ZJNT-Va---",
- "name" : "World",
- "type" : "root"
- },
- {
- "_key" : "continent-africa",
- "_id" : "worldVertices/continent-africa",
- "_rev" : "_ZJNT-Va--A",
- "name" : "Africa",
- "type" : "continent"
- },
- {
- "_key" : "continent-asia",
- "_id" : "worldVertices/continent-asia",
- "_rev" : "_ZJNT-Va--C",
- "name" : "Asia",
- "type" : "continent"
- },
- {
- "_key" : "continent-australia",
- "_id" : "worldVertices/continent-australia",
- "_rev" : "_ZJNT-Ve---",
- "name" : "Australia",
- "type" : "continent"
- },
- {
- "_key" : "continent-europe",
- "_id" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-Ve--A",
- "name" : "Europe",
- "type" : "continent"
- },
- {
- "_key" : "continent-north-america",
- "_id" : "worldVertices/continent-north-america",
- "_rev" : "_ZJNT-Ve--C",
- "name" : "North America",
- "type" : "continent"
- },
- {
- "_key" : "continent-south-america",
- "_id" : "worldVertices/continent-south-america",
- "_rev" : "_ZJNT-Ve--E",
- "name" : "South America",
- "type" : "continent"
- },
- {
- "_key" : "country-afghanistan",
- "_id" : "worldVertices/country-afghanistan",
- "_rev" : "_ZJNT-Vi---",
- "name" : "Afghanistan",
- "type" : "country",
- "code" : "AFG"
- },
- {
- "_key" : "country-albania",
- "_id" : "worldVertices/country-albania",
- "_rev" : "_ZJNT-Vi--A",
- "name" : "Albania",
- "type" : "country",
- "code" : "ALB"
- },
- {
- "_key" : "country-algeria",
- "_id" : "worldVertices/country-algeria",
- "_rev" : "_ZJNT-Vi--C",
- "name" : "Algeria",
- "type" : "country",
- "code" : "DZA"
- },
- {
- "_key" : "country-andorra",
- "_id" : "worldVertices/country-andorra",
- "_rev" : "_ZJNT-Vi--E",
- "name" : "Andorra",
- "type" : "country",
- "code" : "AND"
- },
- {
- "_key" : "country-angola",
- "_id" : "worldVertices/country-angola",
- "_rev" : "_ZJNT-Vm---",
- "name" : "Angola",
- "type" : "country",
- "code" : "AGO"
- },
- {
- "_key" : "country-antigua-and-barbuda",
- "_id" : "worldVertices/country-antigua-and-barbuda",
- "_rev" : "_ZJNT-Vm--A",
- "name" : "Antigua and Barbuda",
- "type" : "country",
- "code" : "ATG"
- },
- {
- "_key" : "country-argentina",
- "_id" : "worldVertices/country-argentina",
- "_rev" : "_ZJNT-Vm--C",
- "name" : "Argentina",
- "type" : "country",
- "code" : "ARG"
- },
- {
- "_key" : "country-australia",
- "_id" : "worldVertices/country-australia",
- "_rev" : "_ZJNT-Vm--E",
- "name" : "Australia",
- "type" : "country",
- "code" : "AUS"
- },
- {
- "_key" : "country-austria",
- "_id" : "worldVertices/country-austria",
- "_rev" : "_ZJNT-Vm--G",
- "name" : "Austria",
- "type" : "country",
- "code" : "AUT"
- },
- {
- "_key" : "country-bahamas",
- "_id" : "worldVertices/country-bahamas",
- "_rev" : "_ZJNT-Vq--_",
- "name" : "Bahamas",
- "type" : "country",
- "code" : "BHS"
- },
- {
- "_key" : "country-bahrain",
- "_id" : "worldVertices/country-bahrain",
- "_rev" : "_ZJNT-Vq--B",
- "name" : "Bahrain",
- "type" : "country",
- "code" : "BHR"
- },
- {
- "_key" : "country-bangladesh",
- "_id" : "worldVertices/country-bangladesh",
- "_rev" : "_ZJNT-Vq--D",
- "name" : "Bangladesh",
- "type" : "country",
- "code" : "BGD"
- },
- {
- "_key" : "country-barbados",
- "_id" : "worldVertices/country-barbados",
- "_rev" : "_ZJNT-Vq--F",
- "name" : "Barbados",
- "type" : "country",
- "code" : "BRB"
- },
- {
- "_key" : "country-belgium",
- "_id" : "worldVertices/country-belgium",
- "_rev" : "_ZJNT-Vu---",
- "name" : "Belgium",
- "type" : "country",
- "code" : "BEL"
- },
- {
- "_key" : "country-bhutan",
- "_id" : "worldVertices/country-bhutan",
- "_rev" : "_ZJNT-Vu--A",
- "name" : "Bhutan",
- "type" : "country",
- "code" : "BTN"
- },
- {
- "_key" : "country-bolivia",
- "_id" : "worldVertices/country-bolivia",
- "_rev" : "_ZJNT-Vu--C",
- "name" : "Bolivia",
- "type" : "country",
- "code" : "BOL"
- },
- {
- "_key" : "country-bosnia-and-herzegovina",
- "_id" : "worldVertices/country-bosnia-and-herzegovina",
- "_rev" : "_ZJNT-Vu--E",
- "name" : "Bosnia and Herzegovina",
- "type" : "country",
- "code" : "BIH"
- },
- {
- "_key" : "country-botswana",
- "_id" : "worldVertices/country-botswana",
- "_rev" : "_ZJNT-Vy---",
- "name" : "Botswana",
- "type" : "country",
- "code" : "BWA"
- },
- {
- "_key" : "country-brazil",
- "_id" : "worldVertices/country-brazil",
- "_rev" : "_ZJNT-Vy--A",
- "name" : "Brazil",
- "type" : "country",
- "code" : "BRA"
- },
- {
- "_key" : "country-brunei",
- "_id" : "worldVertices/country-brunei",
- "_rev" : "_ZJNT-Vy--C",
- "name" : "Brunei",
- "type" : "country",
- "code" : "BRN"
- },
- {
- "_key" : "country-bulgaria",
- "_id" : "worldVertices/country-bulgaria",
- "_rev" : "_ZJNT-Vy--E",
- "name" : "Bulgaria",
- "type" : "country",
- "code" : "BGR"
- },
- {
- "_key" : "country-burkina-faso",
- "_id" : "worldVertices/country-burkina-faso",
- "_rev" : "_ZJNT-Vy--G",
- "name" : "Burkina Faso",
- "type" : "country",
- "code" : "BFA"
- },
- {
- "_key" : "country-burundi",
- "_id" : "worldVertices/country-burundi",
- "_rev" : "_ZJNT-V2---",
- "name" : "Burundi",
- "type" : "country",
- "code" : "BDI"
- },
- {
- "_key" : "country-cambodia",
- "_id" : "worldVertices/country-cambodia",
- "_rev" : "_ZJNT-V2--A",
- "name" : "Cambodia",
- "type" : "country",
- "code" : "KHM"
- },
- {
- "_key" : "country-cameroon",
- "_id" : "worldVertices/country-cameroon",
- "_rev" : "_ZJNT-V2--C",
- "name" : "Cameroon",
- "type" : "country",
- "code" : "CMR"
- },
- {
- "_key" : "country-canada",
- "_id" : "worldVertices/country-canada",
- "_rev" : "_ZJNT-V2--E",
- "name" : "Canada",
- "type" : "country",
- "code" : "CAN"
- },
- {
- "_key" : "country-chad",
- "_id" : "worldVertices/country-chad",
- "_rev" : "_ZJNT-V6---",
- "name" : "Chad",
- "type" : "country",
- "code" : "TCD"
- },
- {
- "_key" : "country-chile",
- "_id" : "worldVertices/country-chile",
- "_rev" : "_ZJNT-V6--A",
- "name" : "Chile",
- "type" : "country",
- "code" : "CHL"
- },
- {
- "_key" : "country-colombia",
- "_id" : "worldVertices/country-colombia",
- "_rev" : "_ZJNT-V6--C",
- "name" : "Colombia",
- "type" : "country",
- "code" : "COL"
- },
- {
- "_key" : "country-cote-d-ivoire",
- "_id" : "worldVertices/country-cote-d-ivoire",
- "_rev" : "_ZJNT-V6--E",
- "name" : "Cote d'Ivoire",
- "type" : "country",
- "code" : "CIV"
- },
- {
- "_key" : "country-croatia",
- "_id" : "worldVertices/country-croatia",
- "_rev" : "_ZJNT-W----",
- "name" : "Croatia",
- "type" : "country",
- "code" : "HRV"
- },
- {
- "_key" : "country-czech-republic",
- "_id" : "worldVertices/country-czech-republic",
- "_rev" : "_ZJNT-W---A",
- "name" : "Czech Republic",
- "type" : "country",
- "code" : "CZE"
- },
- {
- "_key" : "country-denmark",
- "_id" : "worldVertices/country-denmark",
- "_rev" : "_ZJNT-W---C",
- "name" : "Denmark",
- "type" : "country",
- "code" : "DNK"
- },
- {
- "_key" : "country-ecuador",
- "_id" : "worldVertices/country-ecuador",
- "_rev" : "_ZJNT-W---E",
- "name" : "Ecuador",
- "type" : "country",
- "code" : "ECU"
- },
- {
- "_key" : "country-egypt",
- "_id" : "worldVertices/country-egypt",
- "_rev" : "_ZJNT-WC---",
- "name" : "Egypt",
- "type" : "country",
- "code" : "EGY"
- },
- {
- "_key" : "country-eritrea",
- "_id" : "worldVertices/country-eritrea",
- "_rev" : "_ZJNT-WC--A",
- "name" : "Eritrea",
- "type" : "country",
- "code" : "ERI"
- },
- {
- "_key" : "country-finland",
- "_id" : "worldVertices/country-finland",
- "_rev" : "_ZJNT-WC--C",
- "name" : "Finland",
- "type" : "country",
- "code" : "FIN"
- },
- {
- "_key" : "country-france",
- "_id" : "worldVertices/country-france",
- "_rev" : "_ZJNT-WC--E",
- "name" : "France",
- "type" : "country",
- "code" : "FRA"
- },
- {
- "_key" : "country-germany",
- "_id" : "worldVertices/country-germany",
- "_rev" : "_ZJNT-WC--G",
- "name" : "Germany",
- "type" : "country",
- "code" : "DEU"
- },
- {
- "_key" : "country-people-s-republic-of-china",
- "_id" : "worldVertices/country-people-s-republic-of-china",
- "_rev" : "_ZJNT-WG---",
- "name" : "People's Republic of China",
- "type" : "country",
- "code" : "CHN"
- },
- {
- "_key" : "capital-algiers",
- "_id" : "worldVertices/capital-algiers",
- "_rev" : "_ZJNT-WG--A",
- "name" : "Algiers",
- "type" : "capital"
- },
- {
- "_key" : "capital-andorra-la-vella",
- "_id" : "worldVertices/capital-andorra-la-vella",
- "_rev" : "_ZJNT-WG--C",
- "name" : "Andorra la Vella",
- "type" : "capital"
- },
- {
- "_key" : "capital-asmara",
- "_id" : "worldVertices/capital-asmara",
- "_rev" : "_ZJNT-WG--E",
- "name" : "Asmara",
- "type" : "capital"
- },
- {
- "_key" : "capital-bandar-seri-begawan",
- "_id" : "worldVertices/capital-bandar-seri-begawan",
- "_rev" : "_ZJNT-WK---",
- "name" : "Bandar Seri Begawan",
- "type" : "capital"
- },
- {
- "_key" : "capital-beijing",
- "_id" : "worldVertices/capital-beijing",
- "_rev" : "_ZJNT-WK--A",
- "name" : "Beijing",
- "type" : "capital"
- },
- {
- "_key" : "capital-berlin",
- "_id" : "worldVertices/capital-berlin",
- "_rev" : "_ZJNT-WK--C",
- "name" : "Berlin",
- "type" : "capital"
- },
- {
- "_key" : "capital-bogota",
- "_id" : "worldVertices/capital-bogota",
- "_rev" : "_ZJNT-WK--E",
- "name" : "Bogota",
- "type" : "capital"
- },
- {
- "_key" : "capital-brasilia",
- "_id" : "worldVertices/capital-brasilia",
- "_rev" : "_ZJNT-WO---",
- "name" : "Brasilia",
- "type" : "capital"
- },
- {
- "_key" : "capital-bridgetown",
- "_id" : "worldVertices/capital-bridgetown",
- "_rev" : "_ZJNT-WO--A",
- "name" : "Bridgetown",
- "type" : "capital"
- },
- {
- "_key" : "capital-brussels",
- "_id" : "worldVertices/capital-brussels",
- "_rev" : "_ZJNT-WO--C",
- "name" : "Brussels",
- "type" : "capital"
- },
- {
- "_key" : "capital-buenos-aires",
- "_id" : "worldVertices/capital-buenos-aires",
- "_rev" : "_ZJNT-WO--E",
- "name" : "Buenos Aires",
- "type" : "capital"
- },
- {
- "_key" : "capital-bujumbura",
- "_id" : "worldVertices/capital-bujumbura",
- "_rev" : "_ZJNT-WO--G",
- "name" : "Bujumbura",
- "type" : "capital"
- },
- {
- "_key" : "capital-cairo",
- "_id" : "worldVertices/capital-cairo",
- "_rev" : "_ZJNT-WS---",
- "name" : "Cairo",
- "type" : "capital"
- },
- {
- "_key" : "capital-canberra",
- "_id" : "worldVertices/capital-canberra",
- "_rev" : "_ZJNT-WS--A",
- "name" : "Canberra",
- "type" : "capital"
- },
- {
- "_key" : "capital-copenhagen",
- "_id" : "worldVertices/capital-copenhagen",
- "_rev" : "_ZJNT-WS--C",
- "name" : "Copenhagen",
- "type" : "capital"
- },
- {
- "_key" : "capital-dhaka",
- "_id" : "worldVertices/capital-dhaka",
- "_rev" : "_ZJNT-WS--E",
- "name" : "Dhaka",
- "type" : "capital"
- },
- {
- "_key" : "capital-gaborone",
- "_id" : "worldVertices/capital-gaborone",
- "_rev" : "_ZJNT-WW---",
- "name" : "Gaborone",
- "type" : "capital"
- },
- {
- "_key" : "capital-helsinki",
- "_id" : "worldVertices/capital-helsinki",
- "_rev" : "_ZJNT-WW--A",
- "name" : "Helsinki",
- "type" : "capital"
- },
- {
- "_key" : "capital-kabul",
- "_id" : "worldVertices/capital-kabul",
- "_rev" : "_ZJNT-WW--C",
- "name" : "Kabul",
- "type" : "capital"
- },
- {
- "_key" : "capital-la-paz",
- "_id" : "worldVertices/capital-la-paz",
- "_rev" : "_ZJNT-WW--E",
- "name" : "La Paz",
- "type" : "capital"
- },
- {
- "_key" : "capital-luanda",
- "_id" : "worldVertices/capital-luanda",
- "_rev" : "_ZJNT-Wa---",
- "name" : "Luanda",
- "type" : "capital"
- },
- {
- "_key" : "capital-manama",
- "_id" : "worldVertices/capital-manama",
- "_rev" : "_ZJNT-Wa--A",
- "name" : "Manama",
- "type" : "capital"
- },
- {
- "_key" : "capital-nassau",
- "_id" : "worldVertices/capital-nassau",
- "_rev" : "_ZJNT-Wa--C",
- "name" : "Nassau",
- "type" : "capital"
- },
- {
- "_key" : "capital-n-djamena",
- "_id" : "worldVertices/capital-n-djamena",
- "_rev" : "_ZJNT-Wa--E",
- "name" : "N'Djamena",
- "type" : "capital"
- },
- {
- "_key" : "capital-ottawa",
- "_id" : "worldVertices/capital-ottawa",
- "_rev" : "_ZJNT-We---",
- "name" : "Ottawa",
- "type" : "capital"
- },
- {
- "_key" : "capital-ouagadougou",
- "_id" : "worldVertices/capital-ouagadougou",
- "_rev" : "_ZJNT-We--A",
- "name" : "Ouagadougou",
- "type" : "capital"
- },
- {
- "_key" : "capital-paris",
- "_id" : "worldVertices/capital-paris",
- "_rev" : "_ZJNT-We--C",
- "name" : "Paris",
- "type" : "capital"
- },
- {
- "_key" : "capital-phnom-penh",
- "_id" : "worldVertices/capital-phnom-penh",
- "_rev" : "_ZJNT-We--E",
- "name" : "Phnom Penh",
- "type" : "capital"
- },
- {
- "_key" : "capital-prague",
- "_id" : "worldVertices/capital-prague",
- "_rev" : "_ZJNT-We--G",
- "name" : "Prague",
- "type" : "capital"
- },
- {
- "_key" : "capital-quito",
- "_id" : "worldVertices/capital-quito",
- "_rev" : "_ZJNT-Wi---",
- "name" : "Quito",
- "type" : "capital"
- },
- {
- "_key" : "capital-saint-john-s",
- "_id" : "worldVertices/capital-saint-john-s",
- "_rev" : "_ZJNT-Wi--A",
- "name" : "Saint John's",
- "type" : "capital"
- },
- {
- "_key" : "capital-santiago",
- "_id" : "worldVertices/capital-santiago",
- "_rev" : "_ZJNT-Wi--C",
- "name" : "Santiago",
- "type" : "capital"
- },
- {
- "_key" : "capital-sarajevo",
- "_id" : "worldVertices/capital-sarajevo",
- "_rev" : "_ZJNT-Wi--E",
- "name" : "Sarajevo",
- "type" : "capital"
- },
- {
- "_key" : "capital-sofia",
- "_id" : "worldVertices/capital-sofia",
- "_rev" : "_ZJNT-Wm---",
- "name" : "Sofia",
- "type" : "capital"
- },
- {
- "_key" : "capital-thimphu",
- "_id" : "worldVertices/capital-thimphu",
- "_rev" : "_ZJNT-Wm--A",
- "name" : "Thimphu",
- "type" : "capital"
- },
- {
- "_key" : "capital-tirana",
- "_id" : "worldVertices/capital-tirana",
- "_rev" : "_ZJNT-Wm--C",
- "name" : "Tirana",
- "type" : "capital"
- },
- {
- "_key" : "capital-vienna",
- "_id" : "worldVertices/capital-vienna",
- "_rev" : "_ZJNT-Wm--E",
- "name" : "Vienna",
- "type" : "capital"
- },
- {
- "_key" : "capital-yamoussoukro",
- "_id" : "worldVertices/capital-yamoussoukro",
- "_rev" : "_ZJNT-Wq---",
- "name" : "Yamoussoukro",
- "type" : "capital"
- },
- {
- "_key" : "capital-yaounde",
- "_id" : "worldVertices/capital-yaounde",
- "_rev" : "_ZJNT-Wq--A",
- "name" : "Yaounde",
- "type" : "capital"
- },
- {
- "_key" : "capital-zagreb",
- "_id" : "worldVertices/capital-zagreb",
- "_rev" : "_ZJNT-Wq--C",
- "name" : "Zagreb",
- "type" : "capital"
- }
- ]
- [
- {
- "_key" : "87965",
- "_id" : "worldEdges/87965",
- "_from" : "worldVertices/continent-africa",
- "_to" : "worldVertices/world",
- "_rev" : "_ZJNT-Wq--E",
- "type" : "is-in"
- },
- {
- "_key" : "87967",
- "_id" : "worldEdges/87967",
- "_from" : "worldVertices/continent-asia",
- "_to" : "worldVertices/world",
- "_rev" : "_ZJNT-Wq--G",
- "type" : "is-in"
- },
- {
- "_key" : "87969",
- "_id" : "worldEdges/87969",
- "_from" : "worldVertices/continent-australia",
- "_to" : "worldVertices/world",
- "_rev" : "_ZJNT-Wu---",
- "type" : "is-in"
- },
- {
- "_key" : "87971",
- "_id" : "worldEdges/87971",
- "_from" : "worldVertices/continent-europe",
- "_to" : "worldVertices/world",
- "_rev" : "_ZJNT-Wu--A",
- "type" : "is-in"
- },
- {
- "_key" : "87973",
- "_id" : "worldEdges/87973",
- "_from" : "worldVertices/continent-north-america",
- "_to" : "worldVertices/world",
- "_rev" : "_ZJNT-Wu--C",
- "type" : "is-in"
- },
- {
- "_key" : "87975",
- "_id" : "worldEdges/87975",
- "_from" : "worldVertices/continent-south-america",
- "_to" : "worldVertices/world",
- "_rev" : "_ZJNT-Wu--E",
- "type" : "is-in"
- },
- {
- "_key" : "87977",
- "_id" : "worldEdges/87977",
- "_from" : "worldVertices/country-afghanistan",
- "_to" : "worldVertices/continent-asia",
- "_rev" : "_ZJNT-Wy---",
- "type" : "is-in"
- },
- {
- "_key" : "87979",
- "_id" : "worldEdges/87979",
- "_from" : "worldVertices/country-albania",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-Wy--A",
- "type" : "is-in"
- },
- {
- "_key" : "87981",
- "_id" : "worldEdges/87981",
- "_from" : "worldVertices/country-algeria",
- "_to" : "worldVertices/continent-africa",
- "_rev" : "_ZJNT-Wy--C",
- "type" : "is-in"
- },
- {
- "_key" : "87983",
- "_id" : "worldEdges/87983",
- "_from" : "worldVertices/country-andorra",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-Wy--E",
- "type" : "is-in"
- },
- {
- "_key" : "87985",
- "_id" : "worldEdges/87985",
- "_from" : "worldVertices/country-angola",
- "_to" : "worldVertices/continent-africa",
- "_rev" : "_ZJNT-W2---",
- "type" : "is-in"
- },
- {
- "_key" : "87987",
- "_id" : "worldEdges/87987",
- "_from" : "worldVertices/country-antigua-and-barbuda",
- "_to" : "worldVertices/continent-north-america",
- "_rev" : "_ZJNT-W2--A",
- "type" : "is-in"
- },
- {
- "_key" : "87989",
- "_id" : "worldEdges/87989",
- "_from" : "worldVertices/country-argentina",
- "_to" : "worldVertices/continent-south-america",
- "_rev" : "_ZJNT-W2--C",
- "type" : "is-in"
- },
- {
- "_key" : "87991",
- "_id" : "worldEdges/87991",
- "_from" : "worldVertices/country-australia",
- "_to" : "worldVertices/continent-australia",
- "_rev" : "_ZJNT-W2--E",
- "type" : "is-in"
- },
- {
- "_key" : "87993",
- "_id" : "worldEdges/87993",
- "_from" : "worldVertices/country-austria",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-W6---",
- "type" : "is-in"
- },
- {
- "_key" : "87995",
- "_id" : "worldEdges/87995",
- "_from" : "worldVertices/country-bahamas",
- "_to" : "worldVertices/continent-north-america",
- "_rev" : "_ZJNT-W6--A",
- "type" : "is-in"
- },
- {
- "_key" : "87997",
- "_id" : "worldEdges/87997",
- "_from" : "worldVertices/country-bahrain",
- "_to" : "worldVertices/continent-asia",
- "_rev" : "_ZJNT-W6--C",
- "type" : "is-in"
- },
- {
- "_key" : "87999",
- "_id" : "worldEdges/87999",
- "_from" : "worldVertices/country-bangladesh",
- "_to" : "worldVertices/continent-asia",
- "_rev" : "_ZJNT-W6--E",
- "type" : "is-in"
- },
- {
- "_key" : "88001",
- "_id" : "worldEdges/88001",
- "_from" : "worldVertices/country-barbados",
- "_to" : "worldVertices/continent-north-america",
- "_rev" : "_ZJNT-X----",
- "type" : "is-in"
- },
- {
- "_key" : "88003",
- "_id" : "worldEdges/88003",
- "_from" : "worldVertices/country-belgium",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-X---A",
- "type" : "is-in"
- },
- {
- "_key" : "88005",
- "_id" : "worldEdges/88005",
- "_from" : "worldVertices/country-bhutan",
- "_to" : "worldVertices/continent-asia",
- "_rev" : "_ZJNT-X---C",
- "type" : "is-in"
- },
- {
- "_key" : "88007",
- "_id" : "worldEdges/88007",
- "_from" : "worldVertices/country-bolivia",
- "_to" : "worldVertices/continent-south-america",
- "_rev" : "_ZJNT-X---E",
- "type" : "is-in"
- },
- {
- "_key" : "88009",
- "_id" : "worldEdges/88009",
- "_from" : "worldVertices/country-bosnia-and-herzegovina",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-XC---",
- "type" : "is-in"
- },
- {
- "_key" : "88011",
- "_id" : "worldEdges/88011",
- "_from" : "worldVertices/country-botswana",
- "_to" : "worldVertices/continent-africa",
- "_rev" : "_ZJNT-XC--A",
- "type" : "is-in"
- },
- {
- "_key" : "88013",
- "_id" : "worldEdges/88013",
- "_from" : "worldVertices/country-brazil",
- "_to" : "worldVertices/continent-south-america",
- "_rev" : "_ZJNT-XC--C",
- "type" : "is-in"
- },
- {
- "_key" : "88015",
- "_id" : "worldEdges/88015",
- "_from" : "worldVertices/country-brunei",
- "_to" : "worldVertices/continent-asia",
- "_rev" : "_ZJNT-XC--E",
- "type" : "is-in"
- },
- {
- "_key" : "88017",
- "_id" : "worldEdges/88017",
- "_from" : "worldVertices/country-bulgaria",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-XC--G",
- "type" : "is-in"
- },
- {
- "_key" : "88019",
- "_id" : "worldEdges/88019",
- "_from" : "worldVertices/country-burkina-faso",
- "_to" : "worldVertices/continent-africa",
- "_rev" : "_ZJNT-XG---",
- "type" : "is-in"
- },
- {
- "_key" : "88021",
- "_id" : "worldEdges/88021",
- "_from" : "worldVertices/country-burundi",
- "_to" : "worldVertices/continent-africa",
- "_rev" : "_ZJNT-XG--A",
- "type" : "is-in"
- },
- {
- "_key" : "88023",
- "_id" : "worldEdges/88023",
- "_from" : "worldVertices/country-cambodia",
- "_to" : "worldVertices/continent-asia",
- "_rev" : "_ZJNT-XG--C",
- "type" : "is-in"
- },
- {
- "_key" : "88025",
- "_id" : "worldEdges/88025",
- "_from" : "worldVertices/country-cameroon",
- "_to" : "worldVertices/continent-africa",
- "_rev" : "_ZJNT-XG--E",
- "type" : "is-in"
- },
- {
- "_key" : "88027",
- "_id" : "worldEdges/88027",
- "_from" : "worldVertices/country-canada",
- "_to" : "worldVertices/continent-north-america",
- "_rev" : "_ZJNT-XK---",
- "type" : "is-in"
- },
- {
- "_key" : "88029",
- "_id" : "worldEdges/88029",
- "_from" : "worldVertices/country-chad",
- "_to" : "worldVertices/continent-africa",
- "_rev" : "_ZJNT-XK--A",
- "type" : "is-in"
- },
- {
- "_key" : "88031",
- "_id" : "worldEdges/88031",
- "_from" : "worldVertices/country-chile",
- "_to" : "worldVertices/continent-south-america",
- "_rev" : "_ZJNT-XK--C",
- "type" : "is-in"
- },
- {
- "_key" : "88033",
- "_id" : "worldEdges/88033",
- "_from" : "worldVertices/country-colombia",
- "_to" : "worldVertices/continent-south-america",
- "_rev" : "_ZJNT-XO---",
- "type" : "is-in"
- },
- {
- "_key" : "88035",
- "_id" : "worldEdges/88035",
- "_from" : "worldVertices/country-cote-d-ivoire",
- "_to" : "worldVertices/continent-africa",
- "_rev" : "_ZJNT-XO--A",
- "type" : "is-in"
- },
- {
- "_key" : "88037",
- "_id" : "worldEdges/88037",
- "_from" : "worldVertices/country-croatia",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-XO--C",
- "type" : "is-in"
- },
- {
- "_key" : "88039",
- "_id" : "worldEdges/88039",
- "_from" : "worldVertices/country-czech-republic",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-XO--E",
- "type" : "is-in"
- },
- {
- "_key" : "88041",
- "_id" : "worldEdges/88041",
- "_from" : "worldVertices/country-denmark",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-XS---",
- "type" : "is-in"
- },
- {
- "_key" : "88043",
- "_id" : "worldEdges/88043",
- "_from" : "worldVertices/country-ecuador",
- "_to" : "worldVertices/continent-south-america",
- "_rev" : "_ZJNT-XS--A",
- "type" : "is-in"
- },
- {
- "_key" : "88045",
- "_id" : "worldEdges/88045",
- "_from" : "worldVertices/country-egypt",
- "_to" : "worldVertices/continent-africa",
- "_rev" : "_ZJNT-XS--C",
- "type" : "is-in"
- },
- {
- "_key" : "88047",
- "_id" : "worldEdges/88047",
- "_from" : "worldVertices/country-eritrea",
- "_to" : "worldVertices/continent-africa",
- "_rev" : "_ZJNT-XS--E",
- "type" : "is-in"
- },
- {
- "_key" : "88049",
- "_id" : "worldEdges/88049",
- "_from" : "worldVertices/country-finland",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-XS--G",
- "type" : "is-in"
- },
- {
- "_key" : "88051",
- "_id" : "worldEdges/88051",
- "_from" : "worldVertices/country-france",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-XW---",
- "type" : "is-in"
- },
- {
- "_key" : "88053",
- "_id" : "worldEdges/88053",
- "_from" : "worldVertices/country-germany",
- "_to" : "worldVertices/continent-europe",
- "_rev" : "_ZJNT-XW--A",
- "type" : "is-in"
- },
- {
- "_key" : "88055",
- "_id" : "worldEdges/88055",
- "_from" : "worldVertices/country-people-s-republic-of-china",
- "_to" : "worldVertices/continent-asia",
- "_rev" : "_ZJNT-XW--C",
- "type" : "is-in"
- },
- {
- "_key" : "88057",
- "_id" : "worldEdges/88057",
- "_from" : "worldVertices/capital-algiers",
- "_to" : "worldVertices/country-algeria",
- "_rev" : "_ZJNT-XW--E",
- "type" : "is-in"
- },
- {
- "_key" : "88059",
- "_id" : "worldEdges/88059",
- "_from" : "worldVertices/capital-andorra-la-vella",
- "_to" : "worldVertices/country-andorra",
- "_rev" : "_ZJNT-Xa---",
- "type" : "is-in"
- },
- {
- "_key" : "88061",
- "_id" : "worldEdges/88061",
- "_from" : "worldVertices/capital-asmara",
- "_to" : "worldVertices/country-eritrea",
- "_rev" : "_ZJNT-Xa--A",
- "type" : "is-in"
- },
- {
- "_key" : "88063",
- "_id" : "worldEdges/88063",
- "_from" : "worldVertices/capital-bandar-seri-begawan",
- "_to" : "worldVertices/country-brunei",
- "_rev" : "_ZJNT-Xa--C",
- "type" : "is-in"
- },
- {
- "_key" : "88065",
- "_id" : "worldEdges/88065",
- "_from" : "worldVertices/capital-beijing",
- "_to" : "worldVertices/country-people-s-republic-of-china",
- "_rev" : "_ZJNT-Xa--E",
- "type" : "is-in"
- },
- {
- "_key" : "88067",
- "_id" : "worldEdges/88067",
- "_from" : "worldVertices/capital-berlin",
- "_to" : "worldVertices/country-germany",
- "_rev" : "_ZJNT-Xe---",
- "type" : "is-in"
- },
- {
- "_key" : "88069",
- "_id" : "worldEdges/88069",
- "_from" : "worldVertices/capital-bogota",
- "_to" : "worldVertices/country-colombia",
- "_rev" : "_ZJNT-Xe--A",
- "type" : "is-in"
- },
- {
- "_key" : "88071",
- "_id" : "worldEdges/88071",
- "_from" : "worldVertices/capital-brasilia",
- "_to" : "worldVertices/country-brazil",
- "_rev" : "_ZJNT-Xe--C",
- "type" : "is-in"
- },
- {
- "_key" : "88073",
- "_id" : "worldEdges/88073",
- "_from" : "worldVertices/capital-bridgetown",
- "_to" : "worldVertices/country-barbados",
- "_rev" : "_ZJNT-Xi---",
- "type" : "is-in"
- },
- {
- "_key" : "88075",
- "_id" : "worldEdges/88075",
- "_from" : "worldVertices/capital-brussels",
- "_to" : "worldVertices/country-belgium",
- "_rev" : "_ZJNT-Xi--A",
- "type" : "is-in"
- },
- {
- "_key" : "88077",
- "_id" : "worldEdges/88077",
- "_from" : "worldVertices/capital-buenos-aires",
- "_to" : "worldVertices/country-argentina",
- "_rev" : "_ZJNT-Xi--C",
- "type" : "is-in"
- },
- {
- "_key" : "88079",
- "_id" : "worldEdges/88079",
- "_from" : "worldVertices/capital-bujumbura",
- "_to" : "worldVertices/country-burundi",
- "_rev" : "_ZJNT-Xi--E",
- "type" : "is-in"
- },
- {
- "_key" : "88081",
- "_id" : "worldEdges/88081",
- "_from" : "worldVertices/capital-cairo",
- "_to" : "worldVertices/country-egypt",
- "_rev" : "_ZJNT-Xi--G",
- "type" : "is-in"
- },
- {
- "_key" : "88083",
- "_id" : "worldEdges/88083",
- "_from" : "worldVertices/capital-canberra",
- "_to" : "worldVertices/country-australia",
- "_rev" : "_ZJNT-Xm---",
- "type" : "is-in"
- },
- {
- "_key" : "88085",
- "_id" : "worldEdges/88085",
- "_from" : "worldVertices/capital-copenhagen",
- "_to" : "worldVertices/country-denmark",
- "_rev" : "_ZJNT-Xm--A",
- "type" : "is-in"
- },
- {
- "_key" : "88087",
- "_id" : "worldEdges/88087",
- "_from" : "worldVertices/capital-dhaka",
- "_to" : "worldVertices/country-bangladesh",
- "_rev" : "_ZJNT-Xm--C",
- "type" : "is-in"
- },
- {
- "_key" : "88089",
- "_id" : "worldEdges/88089",
- "_from" : "worldVertices/capital-gaborone",
- "_to" : "worldVertices/country-botswana",
- "_rev" : "_ZJNT-Xm--E",
- "type" : "is-in"
- },
- {
- "_key" : "88091",
- "_id" : "worldEdges/88091",
- "_from" : "worldVertices/capital-helsinki",
- "_to" : "worldVertices/country-finland",
- "_rev" : "_ZJNT-Xq--_",
- "type" : "is-in"
- },
- {
- "_key" : "88093",
- "_id" : "worldEdges/88093",
- "_from" : "worldVertices/capital-kabul",
- "_to" : "worldVertices/country-afghanistan",
- "_rev" : "_ZJNT-Xq--B",
- "type" : "is-in"
- },
- {
- "_key" : "88095",
- "_id" : "worldEdges/88095",
- "_from" : "worldVertices/capital-la-paz",
- "_to" : "worldVertices/country-bolivia",
- "_rev" : "_ZJNT-Xq--D",
- "type" : "is-in"
- },
- {
- "_key" : "88097",
- "_id" : "worldEdges/88097",
- "_from" : "worldVertices/capital-luanda",
- "_to" : "worldVertices/country-angola",
- "_rev" : "_ZJNT-Xq--F",
- "type" : "is-in"
- },
- {
- "_key" : "88099",
- "_id" : "worldEdges/88099",
- "_from" : "worldVertices/capital-manama",
- "_to" : "worldVertices/country-bahrain",
- "_rev" : "_ZJNT-Xu---",
- "type" : "is-in"
- },
- {
- "_key" : "88101",
- "_id" : "worldEdges/88101",
- "_from" : "worldVertices/capital-nassau",
- "_to" : "worldVertices/country-bahamas",
- "_rev" : "_ZJNT-Xu--A",
- "type" : "is-in"
- },
- {
- "_key" : "88103",
- "_id" : "worldEdges/88103",
- "_from" : "worldVertices/capital-n-djamena",
- "_to" : "worldVertices/country-chad",
- "_rev" : "_ZJNT-Xu--C",
- "type" : "is-in"
- },
- {
- "_key" : "88105",
- "_id" : "worldEdges/88105",
- "_from" : "worldVertices/capital-ottawa",
- "_to" : "worldVertices/country-canada",
- "_rev" : "_ZJNT-Xu--E",
- "type" : "is-in"
- },
- {
- "_key" : "88107",
- "_id" : "worldEdges/88107",
- "_from" : "worldVertices/capital-ouagadougou",
- "_to" : "worldVertices/country-burkina-faso",
- "_rev" : "_ZJNT-Xy---",
- "type" : "is-in"
- },
- {
- "_key" : "88109",
- "_id" : "worldEdges/88109",
- "_from" : "worldVertices/capital-paris",
- "_to" : "worldVertices/country-france",
- "_rev" : "_ZJNT-Xy--A",
- "type" : "is-in"
- },
- {
- "_key" : "88111",
- "_id" : "worldEdges/88111",
- "_from" : "worldVertices/capital-phnom-penh",
- "_to" : "worldVertices/country-cambodia",
- "_rev" : "_ZJNT-Xy--C",
- "type" : "is-in"
- },
- {
- "_key" : "88113",
- "_id" : "worldEdges/88113",
- "_from" : "worldVertices/capital-prague",
- "_to" : "worldVertices/country-czech-republic",
- "_rev" : "_ZJNT-Xy--E",
- "type" : "is-in"
- },
- {
- "_key" : "88115",
- "_id" : "worldEdges/88115",
- "_from" : "worldVertices/capital-quito",
- "_to" : "worldVertices/country-ecuador",
- "_rev" : "_ZJNT-X2---",
- "type" : "is-in"
- },
- {
- "_key" : "88117",
- "_id" : "worldEdges/88117",
- "_from" : "worldVertices/capital-saint-john-s",
- "_to" : "worldVertices/country-antigua-and-barbuda",
- "_rev" : "_ZJNT-X2--A",
- "type" : "is-in"
- },
- {
- "_key" : "88119",
- "_id" : "worldEdges/88119",
- "_from" : "worldVertices/capital-santiago",
- "_to" : "worldVertices/country-chile",
- "_rev" : "_ZJNT-X2--C",
- "type" : "is-in"
- },
- {
- "_key" : "88121",
- "_id" : "worldEdges/88121",
- "_from" : "worldVertices/capital-sarajevo",
- "_to" : "worldVertices/country-bosnia-and-herzegovina",
- "_rev" : "_ZJNT-X2--E",
- "type" : "is-in"
- },
- {
- "_key" : "88123",
- "_id" : "worldEdges/88123",
- "_from" : "worldVertices/capital-sofia",
- "_to" : "worldVertices/country-bulgaria",
- "_rev" : "_ZJNT-X6---",
- "type" : "is-in"
- },
- {
- "_key" : "88125",
- "_id" : "worldEdges/88125",
- "_from" : "worldVertices/capital-thimphu",
- "_to" : "worldVertices/country-bhutan",
- "_rev" : "_ZJNT-X6--A",
- "type" : "is-in"
- },
- {
- "_key" : "88127",
- "_id" : "worldEdges/88127",
- "_from" : "worldVertices/capital-tirana",
- "_to" : "worldVertices/country-albania",
- "_rev" : "_ZJNT-X6--C",
- "type" : "is-in"
- },
- {
- "_key" : "88129",
- "_id" : "worldEdges/88129",
- "_from" : "worldVertices/capital-vienna",
- "_to" : "worldVertices/country-austria",
- "_rev" : "_ZJNT-X6--E",
- "type" : "is-in"
- },
- {
- "_key" : "88131",
- "_id" : "worldEdges/88131",
- "_from" : "worldVertices/capital-yamoussoukro",
- "_to" : "worldVertices/country-cote-d-ivoire",
- "_rev" : "_ZJNT-Y----",
- "type" : "is-in"
- },
- {
- "_key" : "88133",
- "_id" : "worldEdges/88133",
- "_from" : "worldVertices/capital-yaounde",
- "_to" : "worldVertices/country-cameroon",
- "_rev" : "_ZJNT-Y---A",
- "type" : "is-in"
- },
- {
- "_key" : "88135",
- "_id" : "worldEdges/88135",
- "_from" : "worldVertices/capital-zagreb",
- "_to" : "worldVertices/country-croatia",
- "_rev" : "_ZJNT-Y---C",
- "type" : "is-in"
- }
- ]
Hide execution results
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 mpsverts
collection and _edges in the mpsedges
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
- [
- {
- "_key" : "A",
- "_id" : "mps_verts/A",
- "_rev" : "_ZJNT-Si---"
- },
- {
- "_key" : "B",
- "_id" : "mps_verts/B",
- "_rev" : "_ZJNT-Si--A"
- },
- {
- "_key" : "C",
- "_id" : "mps_verts/C",
- "_rev" : "_ZJNT-Si--C"
- },
- {
- "_key" : "D",
- "_id" : "mps_verts/D",
- "_rev" : "_ZJNT-Sm---"
- },
- {
- "_key" : "E",
- "_id" : "mps_verts/E",
- "_rev" : "_ZJNT-Sm--A"
- },
- {
- "_key" : "F",
- "_id" : "mps_verts/F",
- "_rev" : "_ZJNT-Sm--C"
- }
- ]
- [
- {
- "_key" : "87731",
- "_id" : "mps_edges/87731",
- "_from" : "mps_verts/A",
- "_to" : "mps_verts/B",
- "_rev" : "_ZJNT-Sm--E",
- "vertex" : "A"
- },
- {
- "_key" : "87733",
- "_id" : "mps_edges/87733",
- "_from" : "mps_verts/A",
- "_to" : "mps_verts/E",
- "_rev" : "_ZJNT-Sq---",
- "vertex" : "A"
- },
- {
- "_key" : "87735",
- "_id" : "mps_edges/87735",
- "_from" : "mps_verts/A",
- "_to" : "mps_verts/D",
- "_rev" : "_ZJNT-Sq--A",
- "vertex" : "A"
- },
- {
- "_key" : "87737",
- "_id" : "mps_edges/87737",
- "_from" : "mps_verts/B",
- "_to" : "mps_verts/C",
- "_rev" : "_ZJNT-Sq--C",
- "vertex" : "B"
- },
- {
- "_key" : "87739",
- "_id" : "mps_edges/87739",
- "_from" : "mps_verts/D",
- "_to" : "mps_verts/C",
- "_rev" : "_ZJNT-Su---",
- "vertex" : "D"
- },
- {
- "_key" : "87741",
- "_id" : "mps_edges/87741",
- "_from" : "mps_verts/E",
- "_to" : "mps_verts/F",
- "_rev" : "_ZJNT-Su--A",
- "vertex" : "E"
- },
- {
- "_key" : "87743",
- "_id" : "mps_edges/87743",
- "_from" : "mps_verts/F",
- "_to" : "mps_verts/C",
- "_rev" : "_ZJNT-Su--C",
- "vertex" : "F"
- }
- ]
Hide execution results
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 networkfrom Slovakia that we used for performance testing on several databases;You will find importing scripts etc. in this blogpost.
Cookbook examples
The above referenced chapters describe the various APIs of ArangoDBs graph engine with small examples. Our cookbook has some more real life examples: