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.

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 theWorking 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.

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 actualy 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 ids 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.

User in group example

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:

  1. 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 webinterface, 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 webinterface - which was used to create the pictures below.

You can easily look into the innards of this script for reference about howto manage graphs programatically.

The Knows_Graph

A set of persons knowing each other:Persons relation Example Graph

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:
  1. arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
  2. arangosh> var g = examples.loadGraph("knows_graph");
  3. arangosh> db.persons.toArray()
  4. arangosh> db.knows.toArray();
  5. arangosh> examples.dropGraph("knows_graph");

Show execution results

  1. [
  2. {
  3. "_key" : "bob",
  4. "_id" : "persons/bob",
  5. "_rev" : "_ZHpY48K--B",
  6. "name" : "Bob"
  7. },
  8. {
  9. "_key" : "charlie",
  10. "_id" : "persons/charlie",
  11. "_rev" : "_ZHpY48O--_",
  12. "name" : "Charlie"
  13. },
  14. {
  15. "_key" : "dave",
  16. "_id" : "persons/dave",
  17. "_rev" : "_ZHpY48O--B",
  18. "name" : "Dave"
  19. },
  20. {
  21. "_key" : "eve",
  22. "_id" : "persons/eve",
  23. "_rev" : "_ZHpY48O--D",
  24. "name" : "Eve"
  25. },
  26. {
  27. "_key" : "alice",
  28. "_id" : "persons/alice",
  29. "_rev" : "_ZHpY48K--_",
  30. "name" : "Alice"
  31. }
  32. ]
  33. [
  34. {
  35. "_key" : "35560",
  36. "_id" : "knows/35560",
  37. "_from" : "persons/bob",
  38. "_to" : "persons/dave",
  39. "_rev" : "_ZHpY48S--B",
  40. "vertex" : "bob"
  41. },
  42. {
  43. "_key" : "35553",
  44. "_id" : "knows/35553",
  45. "_from" : "persons/alice",
  46. "_to" : "persons/bob",
  47. "_rev" : "_ZHpY48O--F",
  48. "vertex" : "alice"
  49. },
  50. {
  51. "_key" : "35557",
  52. "_id" : "knows/35557",
  53. "_from" : "persons/bob",
  54. "_to" : "persons/charlie",
  55. "_rev" : "_ZHpY48S--_",
  56. "vertex" : "bob"
  57. },
  58. {
  59. "_key" : "35563",
  60. "_id" : "knows/35563",
  61. "_from" : "persons/eve",
  62. "_to" : "persons/alice",
  63. "_rev" : "_ZHpY48S--D",
  64. "vertex" : "eve"
  65. },
  66. {
  67. "_key" : "35566",
  68. "_id" : "knows/35566",
  69. "_from" : "persons/eve",
  70. "_to" : "persons/bob",
  71. "_rev" : "_ZHpY48S--F",
  72. "vertex" : "eve"
  73. }
  74. ]
  75. true

Hide execution results

The Social Graph

A set of persons and their relations:

Social Example Graph

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:

  1. arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
  2. arangosh> var graph = examples.loadGraph("social");
  3. arangosh> db.female.toArray()
  4. arangosh> db.male.toArray()
  5. arangosh> db.relation.toArray()
  6. arangosh> examples.dropGraph("social");

Show execution results

  1. [
  2. {
  3. "_key" : "diana",
  4. "_id" : "female/diana",
  5. "_rev" : "_ZHpY5BG--F",
  6. "name" : "Diana"
  7. },
  8. {
  9. "_key" : "alice",
  10. "_id" : "female/alice",
  11. "_rev" : "_ZHpY5BG--_",
  12. "name" : "Alice"
  13. }
  14. ]
  15. [
  16. {
  17. "_key" : "bob",
  18. "_id" : "male/bob",
  19. "_rev" : "_ZHpY5BG--B",
  20. "name" : "Bob"
  21. },
  22. {
  23. "_key" : "charly",
  24. "_id" : "male/charly",
  25. "_rev" : "_ZHpY5BG--D",
  26. "name" : "Charly"
  27. }
  28. ]
  29. [
  30. {
  31. "_key" : "35628",
  32. "_id" : "relation/35628",
  33. "_from" : "male/bob",
  34. "_to" : "female/diana",
  35. "_rev" : "_ZHpY5BK--F",
  36. "type" : "friend",
  37. "vertex" : "bob"
  38. },
  39. {
  40. "_key" : "35618",
  41. "_id" : "relation/35618",
  42. "_from" : "female/alice",
  43. "_to" : "male/bob",
  44. "_rev" : "_ZHpY5BK--_",
  45. "type" : "married",
  46. "vertex" : "alice"
  47. },
  48. {
  49. "_key" : "35625",
  50. "_id" : "relation/35625",
  51. "_from" : "male/charly",
  52. "_to" : "female/diana",
  53. "_rev" : "_ZHpY5BK--D",
  54. "type" : "married",
  55. "vertex" : "charly"
  56. },
  57. {
  58. "_key" : "35622",
  59. "_id" : "relation/35622",
  60. "_from" : "female/alice",
  61. "_to" : "male/charly",
  62. "_rev" : "_ZHpY5BK--B",
  63. "type" : "friend",
  64. "vertex" : "alice"
  65. }
  66. ]
  67. true

Hide execution results

The City Graph

A set of european cities, and their fictional traveling distances as connections:

Cities Example Graph

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:

  1. arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
  2. arangosh> var g = examples.loadGraph("routeplanner");
  3. arangosh> db.frenchCity.toArray();
  4. arangosh> db.germanCity.toArray();
  5. arangosh> db.germanHighway.toArray();
  6. arangosh> db.frenchHighway.toArray();
  7. arangosh> db.internationalHighway.toArray();
  8. arangosh> examples.dropGraph("routeplanner");

Show execution results

  1. [
  2. {
  3. "_key" : "Lyon",
  4. "_id" : "frenchCity/Lyon",
  5. "_rev" : "_ZHpY4z---B",
  6. "population" : 80000,
  7. "isCapital" : false,
  8. "loc" : [
  9. 45.76,
  10. 4.84
  11. ]
  12. },
  13. {
  14. "_key" : "Paris",
  15. "_id" : "frenchCity/Paris",
  16. "_rev" : "_ZHpY4z---D",
  17. "population" : 4000000,
  18. "isCapital" : true,
  19. "loc" : [
  20. 48.8567,
  21. 2.3508
  22. ]
  23. }
  24. ]
  25. [
  26. {
  27. "_key" : "Cologne",
  28. "_id" : "germanCity/Cologne",
  29. "_rev" : "_ZHpY4y6--B",
  30. "population" : 1000000,
  31. "isCapital" : false,
  32. "loc" : [
  33. 50.9364,
  34. 6.9528
  35. ]
  36. },
  37. {
  38. "_key" : "Hamburg",
  39. "_id" : "germanCity/Hamburg",
  40. "_rev" : "_ZHpY4z---_",
  41. "population" : 1000000,
  42. "isCapital" : false,
  43. "loc" : [
  44. 53.5653,
  45. 10.0014
  46. ]
  47. },
  48. {
  49. "_key" : "Berlin",
  50. "_id" : "germanCity/Berlin",
  51. "_rev" : "_ZHpY4y6--_",
  52. "population" : 3000000,
  53. "isCapital" : true,
  54. "loc" : [
  55. 52.5167,
  56. 13.3833
  57. ]
  58. }
  59. ]
  60. [
  61. {
  62. "_key" : "35454",
  63. "_id" : "germanHighway/35454",
  64. "_from" : "germanCity/Berlin",
  65. "_to" : "germanCity/Cologne",
  66. "_rev" : "_ZHpY41e--_",
  67. "distance" : 850
  68. },
  69. {
  70. "_key" : "35458",
  71. "_id" : "germanHighway/35458",
  72. "_from" : "germanCity/Berlin",
  73. "_to" : "germanCity/Hamburg",
  74. "_rev" : "_ZHpY41i--_",
  75. "distance" : 400
  76. },
  77. {
  78. "_key" : "35461",
  79. "_id" : "germanHighway/35461",
  80. "_from" : "germanCity/Hamburg",
  81. "_to" : "germanCity/Cologne",
  82. "_rev" : "_ZHpY41i--B",
  83. "distance" : 500
  84. }
  85. ]
  86. [
  87. {
  88. "_key" : "35464",
  89. "_id" : "frenchHighway/35464",
  90. "_from" : "frenchCity/Paris",
  91. "_to" : "frenchCity/Lyon",
  92. "_rev" : "_ZHpY41i--D",
  93. "distance" : 550
  94. }
  95. ]
  96. [
  97. {
  98. "_key" : "35478",
  99. "_id" : "internationalHighway/35478",
  100. "_from" : "germanCity/Hamburg",
  101. "_to" : "frenchCity/Lyon",
  102. "_rev" : "_ZHpY41m--F",
  103. "distance" : 1300
  104. },
  105. {
  106. "_key" : "35484",
  107. "_id" : "internationalHighway/35484",
  108. "_from" : "germanCity/Cologne",
  109. "_to" : "frenchCity/Paris",
  110. "_rev" : "_ZHpY41q--B",
  111. "distance" : 550
  112. },
  113. {
  114. "_key" : "35468",
  115. "_id" : "internationalHighway/35468",
  116. "_from" : "germanCity/Berlin",
  117. "_to" : "frenchCity/Lyon",
  118. "_rev" : "_ZHpY41m--_",
  119. "distance" : 1100
  120. },
  121. {
  122. "_key" : "35475",
  123. "_id" : "internationalHighway/35475",
  124. "_from" : "germanCity/Hamburg",
  125. "_to" : "frenchCity/Paris",
  126. "_rev" : "_ZHpY41m--D",
  127. "distance" : 900
  128. },
  129. {
  130. "_key" : "35472",
  131. "_id" : "internationalHighway/35472",
  132. "_from" : "germanCity/Berlin",
  133. "_to" : "frenchCity/Paris",
  134. "_rev" : "_ZHpY41m--B",
  135. "distance" : 1200
  136. },
  137. {
  138. "_key" : "35481",
  139. "_id" : "internationalHighway/35481",
  140. "_from" : "germanCity/Cologne",
  141. "_to" : "frenchCity/Lyon",
  142. "_rev" : "_ZHpY41q--_",
  143. "distance" : 700
  144. }
  145. ]
  146. true

Hide execution results

The Traversal Graph

This graph was designed to demonstrate filters in traversals. It has some labels to filter on it.

traversal graph

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.

  1. arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
  2. arangosh> var g = examples.loadGraph("traversalGraph");
  3. arangosh> db.circles.toArray();
  4. arangosh> db.edges.toArray();
  5. arangosh> examples.dropGraph("traversalGraph");

Show execution results

  1. [
  2. {
  3. "_key" : "I",
  4. "_id" : "circles/I",
  5. "_rev" : "_ZHpY5G---B",
  6. "label" : "9"
  7. },
  8. {
  9. "_key" : "G",
  10. "_id" : "circles/G",
  11. "_rev" : "_ZHpY5F6--D",
  12. "label" : "7"
  13. },
  14. {
  15. "_key" : "F",
  16. "_id" : "circles/F",
  17. "_rev" : "_ZHpY5F6--B",
  18. "label" : "6"
  19. },
  20. {
  21. "_key" : "A",
  22. "_id" : "circles/A",
  23. "_rev" : "_ZHpY5Fy--_",
  24. "label" : "1"
  25. },
  26. {
  27. "_key" : "E",
  28. "_id" : "circles/E",
  29. "_rev" : "_ZHpY5F6--_",
  30. "label" : "5"
  31. },
  32. {
  33. "_key" : "C",
  34. "_id" : "circles/C",
  35. "_rev" : "_ZHpY5F2--B",
  36. "label" : "3"
  37. },
  38. {
  39. "_key" : "D",
  40. "_id" : "circles/D",
  41. "_rev" : "_ZHpY5F2--D",
  42. "label" : "4"
  43. },
  44. {
  45. "_key" : "J",
  46. "_id" : "circles/J",
  47. "_rev" : "_ZHpY5G---D",
  48. "label" : "10"
  49. },
  50. {
  51. "_key" : "B",
  52. "_id" : "circles/B",
  53. "_rev" : "_ZHpY5F2--_",
  54. "label" : "2"
  55. },
  56. {
  57. "_key" : "H",
  58. "_id" : "circles/H",
  59. "_rev" : "_ZHpY5G---_",
  60. "label" : "8"
  61. },
  62. {
  63. "_key" : "K",
  64. "_id" : "circles/K",
  65. "_rev" : "_ZHpY5GC--_",
  66. "label" : "11"
  67. }
  68. ]
  69. [
  70. {
  71. "_key" : "35715",
  72. "_id" : "edges/35715",
  73. "_from" : "circles/H",
  74. "_to" : "circles/I",
  75. "_rev" : "_ZHpY5GK--B",
  76. "theFalse" : false,
  77. "theTruth" : true,
  78. "label" : "right_blub"
  79. },
  80. {
  81. "_key" : "35703",
  82. "_id" : "edges/35703",
  83. "_from" : "circles/B",
  84. "_to" : "circles/E",
  85. "_rev" : "_ZHpY5GG--B",
  86. "theFalse" : false,
  87. "theTruth" : true,
  88. "label" : "left_blub"
  89. },
  90. {
  91. "_key" : "35697",
  92. "_id" : "edges/35697",
  93. "_from" : "circles/B",
  94. "_to" : "circles/C",
  95. "_rev" : "_ZHpY5GC--D",
  96. "theFalse" : false,
  97. "theTruth" : true,
  98. "label" : "left_blarg"
  99. },
  100. {
  101. "_key" : "35706",
  102. "_id" : "edges/35706",
  103. "_from" : "circles/E",
  104. "_to" : "circles/F",
  105. "_rev" : "_ZHpY5GG--D",
  106. "theFalse" : false,
  107. "theTruth" : true,
  108. "label" : "left_schubi"
  109. },
  110. {
  111. "_key" : "35700",
  112. "_id" : "edges/35700",
  113. "_from" : "circles/C",
  114. "_to" : "circles/D",
  115. "_rev" : "_ZHpY5GG--_",
  116. "theFalse" : false,
  117. "theTruth" : true,
  118. "label" : "left_blorg"
  119. },
  120. {
  121. "_key" : "35709",
  122. "_id" : "edges/35709",
  123. "_from" : "circles/A",
  124. "_to" : "circles/G",
  125. "_rev" : "_ZHpY5GG--F",
  126. "theFalse" : false,
  127. "theTruth" : true,
  128. "label" : "right_foo"
  129. },
  130. {
  131. "_key" : "35693",
  132. "_id" : "edges/35693",
  133. "_from" : "circles/A",
  134. "_to" : "circles/B",
  135. "_rev" : "_ZHpY5GC--B",
  136. "theFalse" : false,
  137. "theTruth" : true,
  138. "label" : "left_bar"
  139. },
  140. {
  141. "_key" : "35721",
  142. "_id" : "edges/35721",
  143. "_from" : "circles/J",
  144. "_to" : "circles/K",
  145. "_rev" : "_ZHpY5GO--_",
  146. "theFalse" : false,
  147. "theTruth" : true,
  148. "label" : "right_zup"
  149. },
  150. {
  151. "_key" : "35712",
  152. "_id" : "edges/35712",
  153. "_from" : "circles/G",
  154. "_to" : "circles/H",
  155. "_rev" : "_ZHpY5GK--_",
  156. "theFalse" : false,
  157. "theTruth" : true,
  158. "label" : "right_blob"
  159. },
  160. {
  161. "_key" : "35718",
  162. "_id" : "edges/35718",
  163. "_from" : "circles/G",
  164. "_to" : "circles/J",
  165. "_rev" : "_ZHpY5GK--D",
  166. "theFalse" : false,
  167. "theTruth" : true,
  168. "label" : "right_zip"
  169. }
  170. ]
  171. true

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.

  1. arangosh> var examples = require("@arangodb/graph-examples/example-graph.js");
  2. arangosh> var g = examples.loadGraph("worldCountry");
  3. arangosh> db.worldVertices.toArray();
  4. arangosh> db.worldEdges.toArray();
  5. arangosh> examples.dropGraph("worldCountry");
  6. arangosh> var g = examples.loadGraph("worldCountryUnManaged");
  7. arangosh> examples.dropGraph("worldCountryUnManaged");

Show execution results

  1. [
  2. {
  3. "_key" : "capital-ottawa",
  4. "_id" : "worldVertices/capital-ottawa",
  5. "_rev" : "_ZHpY5Lu--B",
  6. "name" : "Ottawa",
  7. "type" : "capital"
  8. },
  9. {
  10. "_key" : "capital-yaounde",
  11. "_id" : "worldVertices/capital-yaounde",
  12. "_rev" : "_ZHpY5L6--_",
  13. "name" : "Yaounde",
  14. "type" : "capital"
  15. },
  16. {
  17. "_key" : "capital-algiers",
  18. "_id" : "worldVertices/capital-algiers",
  19. "_rev" : "_ZHpY5La--B",
  20. "name" : "Algiers",
  21. "type" : "capital"
  22. },
  23. {
  24. "_key" : "continent-south-america",
  25. "_id" : "worldVertices/continent-south-america",
  26. "_rev" : "_ZHpY5Ky--D",
  27. "name" : "South America",
  28. "type" : "continent"
  29. },
  30. {
  31. "_key" : "capital-andorra-la-vella",
  32. "_id" : "worldVertices/capital-andorra-la-vella",
  33. "_rev" : "_ZHpY5La--D",
  34. "name" : "Andorra la Vella",
  35. "type" : "capital"
  36. },
  37. {
  38. "_key" : "country-people-s-republic-of-china",
  39. "_id" : "worldVertices/country-people-s-republic-of-china",
  40. "_rev" : "_ZHpY5La--_",
  41. "name" : "People's Republic of China",
  42. "type" : "country",
  43. "code" : "CHN"
  44. },
  45. {
  46. "_key" : "capital-tirana",
  47. "_id" : "worldVertices/capital-tirana",
  48. "_rev" : "_ZHpY5L2--D",
  49. "name" : "Tirana",
  50. "type" : "capital"
  51. },
  52. {
  53. "_key" : "country-cote-d-ivoire",
  54. "_id" : "worldVertices/country-cote-d-ivoire",
  55. "_rev" : "_ZHpY5LS--_",
  56. "name" : "Cote d'Ivoire",
  57. "type" : "country",
  58. "code" : "CIV"
  59. },
  60. {
  61. "_key" : "capital-sofia",
  62. "_id" : "worldVertices/capital-sofia",
  63. "_rev" : "_ZHpY5L2--_",
  64. "name" : "Sofia",
  65. "type" : "capital"
  66. },
  67. {
  68. "_key" : "capital-bridgetown",
  69. "_id" : "worldVertices/capital-bridgetown",
  70. "_rev" : "_ZHpY5Le--H",
  71. "name" : "Bridgetown",
  72. "type" : "capital"
  73. },
  74. {
  75. "_key" : "country-chad",
  76. "_id" : "worldVertices/country-chad",
  77. "_rev" : "_ZHpY5LO--D",
  78. "name" : "Chad",
  79. "type" : "country",
  80. "code" : "TCD"
  81. },
  82. {
  83. "_key" : "capital-thimphu",
  84. "_id" : "worldVertices/capital-thimphu",
  85. "_rev" : "_ZHpY5L2--B",
  86. "name" : "Thimphu",
  87. "type" : "capital"
  88. },
  89. {
  90. "_key" : "capital-santiago",
  91. "_id" : "worldVertices/capital-santiago",
  92. "_rev" : "_ZHpY5Ly--F",
  93. "name" : "Santiago",
  94. "type" : "capital"
  95. },
  96. {
  97. "_key" : "capital-manama",
  98. "_id" : "worldVertices/capital-manama",
  99. "_rev" : "_ZHpY5Lq--F",
  100. "name" : "Manama",
  101. "type" : "capital"
  102. },
  103. {
  104. "_key" : "capital-zagreb",
  105. "_id" : "worldVertices/capital-zagreb",
  106. "_rev" : "_ZHpY5L6--B",
  107. "name" : "Zagreb",
  108. "type" : "capital"
  109. },
  110. {
  111. "_key" : "country-brazil",
  112. "_id" : "worldVertices/country-brazil",
  113. "_rev" : "_ZHpY5LG--F",
  114. "name" : "Brazil",
  115. "type" : "country",
  116. "code" : "BRA"
  117. },
  118. {
  119. "_key" : "country-burundi",
  120. "_id" : "worldVertices/country-burundi",
  121. "_rev" : "_ZHpY5LK--F",
  122. "name" : "Burundi",
  123. "type" : "country",
  124. "code" : "BDI"
  125. },
  126. {
  127. "_key" : "capital-la-paz",
  128. "_id" : "worldVertices/capital-la-paz",
  129. "_rev" : "_ZHpY5Lq--B",
  130. "name" : "La Paz",
  131. "type" : "capital"
  132. },
  133. {
  134. "_key" : "country-germany",
  135. "_id" : "worldVertices/country-germany",
  136. "_rev" : "_ZHpY5LW--H",
  137. "name" : "Germany",
  138. "type" : "country",
  139. "code" : "DEU"
  140. },
  141. {
  142. "_key" : "country-botswana",
  143. "_id" : "worldVertices/country-botswana",
  144. "_rev" : "_ZHpY5LG--D",
  145. "name" : "Botswana",
  146. "type" : "country",
  147. "code" : "BWA"
  148. },
  149. {
  150. "_key" : "capital-phnom-penh",
  151. "_id" : "worldVertices/capital-phnom-penh",
  152. "_rev" : "_ZHpY5Lu--H",
  153. "name" : "Phnom Penh",
  154. "type" : "capital"
  155. },
  156. {
  157. "_key" : "country-croatia",
  158. "_id" : "worldVertices/country-croatia",
  159. "_rev" : "_ZHpY5LS--B",
  160. "name" : "Croatia",
  161. "type" : "country",
  162. "code" : "HRV"
  163. },
  164. {
  165. "_key" : "country-eritrea",
  166. "_id" : "worldVertices/country-eritrea",
  167. "_rev" : "_ZHpY5LW--B",
  168. "name" : "Eritrea",
  169. "type" : "country",
  170. "code" : "ERI"
  171. },
  172. {
  173. "_key" : "country-angola",
  174. "_id" : "worldVertices/country-angola",
  175. "_rev" : "_ZHpY5K6--B",
  176. "name" : "Angola",
  177. "type" : "country",
  178. "code" : "AGO"
  179. },
  180. {
  181. "_key" : "country-bahrain",
  182. "_id" : "worldVertices/country-bahrain",
  183. "_rev" : "_ZHpY5L---F",
  184. "name" : "Bahrain",
  185. "type" : "country",
  186. "code" : "BHR"
  187. },
  188. {
  189. "_key" : "country-argentina",
  190. "_id" : "worldVertices/country-argentina",
  191. "_rev" : "_ZHpY5K6--F",
  192. "name" : "Argentina",
  193. "type" : "country",
  194. "code" : "ARG"
  195. },
  196. {
  197. "_key" : "capital-canberra",
  198. "_id" : "worldVertices/capital-canberra",
  199. "_rev" : "_ZHpY5Lm---",
  200. "name" : "Canberra",
  201. "type" : "capital"
  202. },
  203. {
  204. "_key" : "capital-bujumbura",
  205. "_id" : "worldVertices/capital-bujumbura",
  206. "_rev" : "_ZHpY5Li--D",
  207. "name" : "Bujumbura",
  208. "type" : "capital"
  209. },
  210. {
  211. "_key" : "country-bangladesh",
  212. "_id" : "worldVertices/country-bangladesh",
  213. "_rev" : "_ZHpY5LC--_",
  214. "name" : "Bangladesh",
  215. "type" : "country",
  216. "code" : "BGD"
  217. },
  218. {
  219. "_key" : "country-ecuador",
  220. "_id" : "worldVertices/country-ecuador",
  221. "_rev" : "_ZHpY5LS--H",
  222. "name" : "Ecuador",
  223. "type" : "country",
  224. "code" : "ECU"
  225. },
  226. {
  227. "_key" : "continent-africa",
  228. "_id" : "worldVertices/continent-africa",
  229. "_rev" : "_ZHpY5Ku--_",
  230. "name" : "Africa",
  231. "type" : "continent"
  232. },
  233. {
  234. "_key" : "country-cambodia",
  235. "_id" : "worldVertices/country-cambodia",
  236. "_rev" : "_ZHpY5LK--H",
  237. "name" : "Cambodia",
  238. "type" : "country",
  239. "code" : "KHM"
  240. },
  241. {
  242. "_key" : "country-chile",
  243. "_id" : "worldVertices/country-chile",
  244. "_rev" : "_ZHpY5LO--F",
  245. "name" : "Chile",
  246. "type" : "country",
  247. "code" : "CHL"
  248. },
  249. {
  250. "_key" : "country-bolivia",
  251. "_id" : "worldVertices/country-bolivia",
  252. "_rev" : "_ZHpY5LG--_",
  253. "name" : "Bolivia",
  254. "type" : "country",
  255. "code" : "BOL"
  256. },
  257. {
  258. "_key" : "country-belgium",
  259. "_id" : "worldVertices/country-belgium",
  260. "_rev" : "_ZHpY5LC--D",
  261. "name" : "Belgium",
  262. "type" : "country",
  263. "code" : "BEL"
  264. },
  265. {
  266. "_key" : "capital-copenhagen",
  267. "_id" : "worldVertices/capital-copenhagen",
  268. "_rev" : "_ZHpY5Lm--A",
  269. "name" : "Copenhagen",
  270. "type" : "capital"
  271. },
  272. {
  273. "_key" : "country-cameroon",
  274. "_id" : "worldVertices/country-cameroon",
  275. "_rev" : "_ZHpY5LO--_",
  276. "name" : "Cameroon",
  277. "type" : "country",
  278. "code" : "CMR"
  279. },
  280. {
  281. "_key" : "capital-gaborone",
  282. "_id" : "worldVertices/capital-gaborone",
  283. "_rev" : "_ZHpY5Lm--E",
  284. "name" : "Gaborone",
  285. "type" : "capital"
  286. },
  287. {
  288. "_key" : "continent-australia",
  289. "_id" : "worldVertices/continent-australia",
  290. "_rev" : "_ZHpY5Ku--D",
  291. "name" : "Australia",
  292. "type" : "continent"
  293. },
  294. {
  295. "_key" : "world",
  296. "_id" : "worldVertices/world",
  297. "_rev" : "_ZHpY5Kq--_",
  298. "name" : "World",
  299. "type" : "root"
  300. },
  301. {
  302. "_key" : "capital-yamoussoukro",
  303. "_id" : "worldVertices/capital-yamoussoukro",
  304. "_rev" : "_ZHpY5L2--H",
  305. "name" : "Yamoussoukro",
  306. "type" : "capital"
  307. },
  308. {
  309. "_key" : "capital-brasilia",
  310. "_id" : "worldVertices/capital-brasilia",
  311. "_rev" : "_ZHpY5Le--F",
  312. "name" : "Brasilia",
  313. "type" : "capital"
  314. },
  315. {
  316. "_key" : "country-antigua-and-barbuda",
  317. "_id" : "worldVertices/country-antigua-and-barbuda",
  318. "_rev" : "_ZHpY5K6--D",
  319. "name" : "Antigua and Barbuda",
  320. "type" : "country",
  321. "code" : "ATG"
  322. },
  323. {
  324. "_key" : "capital-bandar-seri-begawan",
  325. "_id" : "worldVertices/capital-bandar-seri-begawan",
  326. "_rev" : "_ZHpY5La--H",
  327. "name" : "Bandar Seri Begawan",
  328. "type" : "capital"
  329. },
  330. {
  331. "_key" : "capital-dhaka",
  332. "_id" : "worldVertices/capital-dhaka",
  333. "_rev" : "_ZHpY5Lm--C",
  334. "name" : "Dhaka",
  335. "type" : "capital"
  336. },
  337. {
  338. "_key" : "capital-saint-john-s",
  339. "_id" : "worldVertices/capital-saint-john-s",
  340. "_rev" : "_ZHpY5Ly--D",
  341. "name" : "Saint John's",
  342. "type" : "capital"
  343. },
  344. {
  345. "_key" : "country-burkina-faso",
  346. "_id" : "worldVertices/country-burkina-faso",
  347. "_rev" : "_ZHpY5LK--D",
  348. "name" : "Burkina Faso",
  349. "type" : "country",
  350. "code" : "BFA"
  351. },
  352. {
  353. "_key" : "capital-prague",
  354. "_id" : "worldVertices/capital-prague",
  355. "_rev" : "_ZHpY5Ly--_",
  356. "name" : "Prague",
  357. "type" : "capital"
  358. },
  359. {
  360. "_key" : "country-czech-republic",
  361. "_id" : "worldVertices/country-czech-republic",
  362. "_rev" : "_ZHpY5LS--D",
  363. "name" : "Czech Republic",
  364. "type" : "country",
  365. "code" : "CZE"
  366. },
  367. {
  368. "_key" : "country-egypt",
  369. "_id" : "worldVertices/country-egypt",
  370. "_rev" : "_ZHpY5LW--_",
  371. "name" : "Egypt",
  372. "type" : "country",
  373. "code" : "EGY"
  374. },
  375. {
  376. "_key" : "capital-helsinki",
  377. "_id" : "worldVertices/capital-helsinki",
  378. "_rev" : "_ZHpY5Lm--G",
  379. "name" : "Helsinki",
  380. "type" : "capital"
  381. },
  382. {
  383. "_key" : "country-bhutan",
  384. "_id" : "worldVertices/country-bhutan",
  385. "_rev" : "_ZHpY5LC--F",
  386. "name" : "Bhutan",
  387. "type" : "country",
  388. "code" : "BTN"
  389. },
  390. {
  391. "_key" : "country-algeria",
  392. "_id" : "worldVertices/country-algeria",
  393. "_rev" : "_ZHpY5K2--D",
  394. "name" : "Algeria",
  395. "type" : "country",
  396. "code" : "DZA"
  397. },
  398. {
  399. "_key" : "country-afghanistan",
  400. "_id" : "worldVertices/country-afghanistan",
  401. "_rev" : "_ZHpY5K2--_",
  402. "name" : "Afghanistan",
  403. "type" : "country",
  404. "code" : "AFG"
  405. },
  406. {
  407. "_key" : "capital-paris",
  408. "_id" : "worldVertices/capital-paris",
  409. "_rev" : "_ZHpY5Lu--F",
  410. "name" : "Paris",
  411. "type" : "capital"
  412. },
  413. {
  414. "_key" : "country-finland",
  415. "_id" : "worldVertices/country-finland",
  416. "_rev" : "_ZHpY5LW--D",
  417. "name" : "Finland",
  418. "type" : "country",
  419. "code" : "FIN"
  420. },
  421. {
  422. "_key" : "country-austria",
  423. "_id" : "worldVertices/country-austria",
  424. "_rev" : "_ZHpY5L---B",
  425. "name" : "Austria",
  426. "type" : "country",
  427. "code" : "AUT"
  428. },
  429. {
  430. "_key" : "capital-brussels",
  431. "_id" : "worldVertices/capital-brussels",
  432. "_rev" : "_ZHpY5Li--_",
  433. "name" : "Brussels",
  434. "type" : "capital"
  435. },
  436. {
  437. "_key" : "country-denmark",
  438. "_id" : "worldVertices/country-denmark",
  439. "_rev" : "_ZHpY5LS--F",
  440. "name" : "Denmark",
  441. "type" : "country",
  442. "code" : "DNK"
  443. },
  444. {
  445. "_key" : "country-albania",
  446. "_id" : "worldVertices/country-albania",
  447. "_rev" : "_ZHpY5K2--B",
  448. "name" : "Albania",
  449. "type" : "country",
  450. "code" : "ALB"
  451. },
  452. {
  453. "_key" : "capital-berlin",
  454. "_id" : "worldVertices/capital-berlin",
  455. "_rev" : "_ZHpY5Le--B",
  456. "name" : "Berlin",
  457. "type" : "capital"
  458. },
  459. {
  460. "_key" : "capital-buenos-aires",
  461. "_id" : "worldVertices/capital-buenos-aires",
  462. "_rev" : "_ZHpY5Li--B",
  463. "name" : "Buenos Aires",
  464. "type" : "capital"
  465. },
  466. {
  467. "_key" : "capital-quito",
  468. "_id" : "worldVertices/capital-quito",
  469. "_rev" : "_ZHpY5Ly--B",
  470. "name" : "Quito",
  471. "type" : "capital"
  472. },
  473. {
  474. "_key" : "country-france",
  475. "_id" : "worldVertices/country-france",
  476. "_rev" : "_ZHpY5LW--F",
  477. "name" : "France",
  478. "type" : "country",
  479. "code" : "FRA"
  480. },
  481. {
  482. "_key" : "country-colombia",
  483. "_id" : "worldVertices/country-colombia",
  484. "_rev" : "_ZHpY5LO--H",
  485. "name" : "Colombia",
  486. "type" : "country",
  487. "code" : "COL"
  488. },
  489. {
  490. "_key" : "country-bulgaria",
  491. "_id" : "worldVertices/country-bulgaria",
  492. "_rev" : "_ZHpY5LK--B",
  493. "name" : "Bulgaria",
  494. "type" : "country",
  495. "code" : "BGR"
  496. },
  497. {
  498. "_key" : "continent-north-america",
  499. "_id" : "worldVertices/continent-north-america",
  500. "_rev" : "_ZHpY5Ky--B",
  501. "name" : "North America",
  502. "type" : "continent"
  503. },
  504. {
  505. "_key" : "capital-vienna",
  506. "_id" : "worldVertices/capital-vienna",
  507. "_rev" : "_ZHpY5L2--F",
  508. "name" : "Vienna",
  509. "type" : "capital"
  510. },
  511. {
  512. "_key" : "country-bahamas",
  513. "_id" : "worldVertices/country-bahamas",
  514. "_rev" : "_ZHpY5L---D",
  515. "name" : "Bahamas",
  516. "type" : "country",
  517. "code" : "BHS"
  518. },
  519. {
  520. "_key" : "continent-asia",
  521. "_id" : "worldVertices/continent-asia",
  522. "_rev" : "_ZHpY5Ku--B",
  523. "name" : "Asia",
  524. "type" : "continent"
  525. },
  526. {
  527. "_key" : "country-barbados",
  528. "_id" : "worldVertices/country-barbados",
  529. "_rev" : "_ZHpY5LC--B",
  530. "name" : "Barbados",
  531. "type" : "country",
  532. "code" : "BRB"
  533. },
  534. {
  535. "_key" : "capital-n-djamena",
  536. "_id" : "worldVertices/capital-n-djamena",
  537. "_rev" : "_ZHpY5Lu--_",
  538. "name" : "N'Djamena",
  539. "type" : "capital"
  540. },
  541. {
  542. "_key" : "capital-ouagadougou",
  543. "_id" : "worldVertices/capital-ouagadougou",
  544. "_rev" : "_ZHpY5Lu--D",
  545. "name" : "Ouagadougou",
  546. "type" : "capital"
  547. },
  548. {
  549. "_key" : "capital-bogota",
  550. "_id" : "worldVertices/capital-bogota",
  551. "_rev" : "_ZHpY5Le--D",
  552. "name" : "Bogota",
  553. "type" : "capital"
  554. },
  555. {
  556. "_key" : "country-brunei",
  557. "_id" : "worldVertices/country-brunei",
  558. "_rev" : "_ZHpY5LK--_",
  559. "name" : "Brunei",
  560. "type" : "country",
  561. "code" : "BRN"
  562. },
  563. {
  564. "_key" : "capital-asmara",
  565. "_id" : "worldVertices/capital-asmara",
  566. "_rev" : "_ZHpY5La--F",
  567. "name" : "Asmara",
  568. "type" : "capital"
  569. },
  570. {
  571. "_key" : "capital-cairo",
  572. "_id" : "worldVertices/capital-cairo",
  573. "_rev" : "_ZHpY5Li--F",
  574. "name" : "Cairo",
  575. "type" : "capital"
  576. },
  577. {
  578. "_key" : "capital-kabul",
  579. "_id" : "worldVertices/capital-kabul",
  580. "_rev" : "_ZHpY5Lq--_",
  581. "name" : "Kabul",
  582. "type" : "capital"
  583. },
  584. {
  585. "_key" : "capital-nassau",
  586. "_id" : "worldVertices/capital-nassau",
  587. "_rev" : "_ZHpY5Lq--H",
  588. "name" : "Nassau",
  589. "type" : "capital"
  590. },
  591. {
  592. "_key" : "capital-beijing",
  593. "_id" : "worldVertices/capital-beijing",
  594. "_rev" : "_ZHpY5Le--_",
  595. "name" : "Beijing",
  596. "type" : "capital"
  597. },
  598. {
  599. "_key" : "country-canada",
  600. "_id" : "worldVertices/country-canada",
  601. "_rev" : "_ZHpY5LO--B",
  602. "name" : "Canada",
  603. "type" : "country",
  604. "code" : "CAN"
  605. },
  606. {
  607. "_key" : "continent-europe",
  608. "_id" : "worldVertices/continent-europe",
  609. "_rev" : "_ZHpY5Ky--_",
  610. "name" : "Europe",
  611. "type" : "continent"
  612. },
  613. {
  614. "_key" : "capital-luanda",
  615. "_id" : "worldVertices/capital-luanda",
  616. "_rev" : "_ZHpY5Lq--D",
  617. "name" : "Luanda",
  618. "type" : "capital"
  619. },
  620. {
  621. "_key" : "country-australia",
  622. "_id" : "worldVertices/country-australia",
  623. "_rev" : "_ZHpY5L---_",
  624. "name" : "Australia",
  625. "type" : "country",
  626. "code" : "AUS"
  627. },
  628. {
  629. "_key" : "capital-sarajevo",
  630. "_id" : "worldVertices/capital-sarajevo",
  631. "_rev" : "_ZHpY5Ly--H",
  632. "name" : "Sarajevo",
  633. "type" : "capital"
  634. },
  635. {
  636. "_key" : "country-andorra",
  637. "_id" : "worldVertices/country-andorra",
  638. "_rev" : "_ZHpY5K6--_",
  639. "name" : "Andorra",
  640. "type" : "country",
  641. "code" : "AND"
  642. },
  643. {
  644. "_key" : "country-bosnia-and-herzegovina",
  645. "_id" : "worldVertices/country-bosnia-and-herzegovina",
  646. "_rev" : "_ZHpY5LG--B",
  647. "name" : "Bosnia and Herzegovina",
  648. "type" : "country",
  649. "code" : "BIH"
  650. }
  651. ]
  652. [
  653. {
  654. "_key" : "36107",
  655. "_id" : "worldEdges/36107",
  656. "_from" : "worldVertices/capital-cairo",
  657. "_to" : "worldVertices/country-egypt",
  658. "_rev" : "_ZHpY5Mq--F",
  659. "type" : "is-in"
  660. },
  661. {
  662. "_key" : "36143",
  663. "_id" : "worldEdges/36143",
  664. "_from" : "worldVertices/capital-ottawa",
  665. "_to" : "worldVertices/country-canada",
  666. "_rev" : "_ZHpY5M2--D",
  667. "type" : "is-in"
  668. },
  669. {
  670. "_key" : "36101",
  671. "_id" : "worldEdges/36101",
  672. "_from" : "worldVertices/capital-buenos-aires",
  673. "_to" : "worldVertices/country-argentina",
  674. "_rev" : "_ZHpY5Mq--B",
  675. "type" : "is-in"
  676. },
  677. {
  678. "_key" : "36074",
  679. "_id" : "worldEdges/36074",
  680. "_from" : "worldVertices/capital-andorra-la-vella",
  681. "_to" : "worldVertices/country-andorra",
  682. "_rev" : "_ZHpY5Mi--B",
  683. "type" : "is-in"
  684. },
  685. {
  686. "_key" : "35978",
  687. "_id" : "worldEdges/35978",
  688. "_from" : "worldVertices/country-bahamas",
  689. "_to" : "worldVertices/continent-north-america",
  690. "_rev" : "_ZHpY5MG--F",
  691. "type" : "is-in"
  692. },
  693. {
  694. "_key" : "35975",
  695. "_id" : "worldEdges/35975",
  696. "_from" : "worldVertices/country-austria",
  697. "_to" : "worldVertices/continent-europe",
  698. "_rev" : "_ZHpY5MG--D",
  699. "type" : "is-in"
  700. },
  701. {
  702. "_key" : "36137",
  703. "_id" : "worldEdges/36137",
  704. "_from" : "worldVertices/capital-nassau",
  705. "_to" : "worldVertices/country-bahamas",
  706. "_rev" : "_ZHpY5M2--_",
  707. "type" : "is-in"
  708. },
  709. {
  710. "_key" : "35960",
  711. "_id" : "worldEdges/35960",
  712. "_from" : "worldVertices/country-andorra",
  713. "_to" : "worldVertices/continent-europe",
  714. "_rev" : "_ZHpY5MC--D",
  715. "type" : "is-in"
  716. },
  717. {
  718. "_key" : "36110",
  719. "_id" : "worldEdges/36110",
  720. "_from" : "worldVertices/capital-canberra",
  721. "_to" : "worldVertices/country-australia",
  722. "_rev" : "_ZHpY5Mu--_",
  723. "type" : "is-in"
  724. },
  725. {
  726. "_key" : "36062",
  727. "_id" : "worldEdges/36062",
  728. "_from" : "worldVertices/country-france",
  729. "_to" : "worldVertices/continent-europe",
  730. "_rev" : "_ZHpY5Me--D",
  731. "type" : "is-in"
  732. },
  733. {
  734. "_key" : "35981",
  735. "_id" : "worldEdges/35981",
  736. "_from" : "worldVertices/country-bahrain",
  737. "_to" : "worldVertices/continent-asia",
  738. "_rev" : "_ZHpY5MG--H",
  739. "type" : "is-in"
  740. },
  741. {
  742. "_key" : "35948",
  743. "_id" : "worldEdges/35948",
  744. "_from" : "worldVertices/continent-south-america",
  745. "_to" : "worldVertices/world",
  746. "_rev" : "_ZHpY5M---D",
  747. "type" : "is-in"
  748. },
  749. {
  750. "_key" : "36116",
  751. "_id" : "worldEdges/36116",
  752. "_from" : "worldVertices/capital-dhaka",
  753. "_to" : "worldVertices/country-bangladesh",
  754. "_rev" : "_ZHpY5Mu--D",
  755. "type" : "is-in"
  756. },
  757. {
  758. "_key" : "36059",
  759. "_id" : "worldEdges/36059",
  760. "_from" : "worldVertices/country-finland",
  761. "_to" : "worldVertices/continent-europe",
  762. "_rev" : "_ZHpY5Me--B",
  763. "type" : "is-in"
  764. },
  765. {
  766. "_key" : "36005",
  767. "_id" : "worldEdges/36005",
  768. "_from" : "worldVertices/country-brazil",
  769. "_to" : "worldVertices/continent-south-america",
  770. "_rev" : "_ZHpY5MO--D",
  771. "type" : "is-in"
  772. },
  773. {
  774. "_key" : "36038",
  775. "_id" : "worldEdges/36038",
  776. "_from" : "worldVertices/country-cote-d-ivoire",
  777. "_to" : "worldVertices/continent-africa",
  778. "_rev" : "_ZHpY5MW--F",
  779. "type" : "is-in"
  780. },
  781. {
  782. "_key" : "36119",
  783. "_id" : "worldEdges/36119",
  784. "_from" : "worldVertices/capital-gaborone",
  785. "_to" : "worldVertices/country-botswana",
  786. "_rev" : "_ZHpY5Mu--F",
  787. "type" : "is-in"
  788. },
  789. {
  790. "_key" : "35951",
  791. "_id" : "worldEdges/35951",
  792. "_from" : "worldVertices/country-afghanistan",
  793. "_to" : "worldVertices/continent-asia",
  794. "_rev" : "_ZHpY5M---F",
  795. "type" : "is-in"
  796. },
  797. {
  798. "_key" : "35957",
  799. "_id" : "worldEdges/35957",
  800. "_from" : "worldVertices/country-algeria",
  801. "_to" : "worldVertices/continent-africa",
  802. "_rev" : "_ZHpY5MC--B",
  803. "type" : "is-in"
  804. },
  805. {
  806. "_key" : "36023",
  807. "_id" : "worldEdges/36023",
  808. "_from" : "worldVertices/country-cameroon",
  809. "_to" : "worldVertices/continent-africa",
  810. "_rev" : "_ZHpY5MS--F",
  811. "type" : "is-in"
  812. },
  813. {
  814. "_key" : "35996",
  815. "_id" : "worldEdges/35996",
  816. "_from" : "worldVertices/country-bolivia",
  817. "_to" : "worldVertices/continent-south-america",
  818. "_rev" : "_ZHpY5MK--H",
  819. "type" : "is-in"
  820. },
  821. {
  822. "_key" : "36089",
  823. "_id" : "worldEdges/36089",
  824. "_from" : "worldVertices/capital-bogota",
  825. "_to" : "worldVertices/country-colombia",
  826. "_rev" : "_ZHpY5Mm--B",
  827. "type" : "is-in"
  828. },
  829. {
  830. "_key" : "35966",
  831. "_id" : "worldEdges/35966",
  832. "_from" : "worldVertices/country-antigua-and-barbuda",
  833. "_to" : "worldVertices/continent-north-america",
  834. "_rev" : "_ZHpY5MC--H",
  835. "type" : "is-in"
  836. },
  837. {
  838. "_key" : "36011",
  839. "_id" : "worldEdges/36011",
  840. "_from" : "worldVertices/country-bulgaria",
  841. "_to" : "worldVertices/continent-europe",
  842. "_rev" : "_ZHpY5MO--H",
  843. "type" : "is-in"
  844. },
  845. {
  846. "_key" : "36056",
  847. "_id" : "worldEdges/36056",
  848. "_from" : "worldVertices/country-eritrea",
  849. "_to" : "worldVertices/continent-africa",
  850. "_rev" : "_ZHpY5Me--_",
  851. "type" : "is-in"
  852. },
  853. {
  854. "_key" : "36002",
  855. "_id" : "worldEdges/36002",
  856. "_from" : "worldVertices/country-botswana",
  857. "_to" : "worldVertices/continent-africa",
  858. "_rev" : "_ZHpY5MO--B",
  859. "type" : "is-in"
  860. },
  861. {
  862. "_key" : "35932",
  863. "_id" : "worldEdges/35932",
  864. "_from" : "worldVertices/continent-africa",
  865. "_to" : "worldVertices/world",
  866. "_rev" : "_ZHpY5L6--D",
  867. "type" : "is-in"
  868. },
  869. {
  870. "_key" : "35990",
  871. "_id" : "worldEdges/35990",
  872. "_from" : "worldVertices/country-belgium",
  873. "_to" : "worldVertices/continent-europe",
  874. "_rev" : "_ZHpY5MK--D",
  875. "type" : "is-in"
  876. },
  877. {
  878. "_key" : "36053",
  879. "_id" : "worldEdges/36053",
  880. "_from" : "worldVertices/country-egypt",
  881. "_to" : "worldVertices/continent-africa",
  882. "_rev" : "_ZHpY5Ma--F",
  883. "type" : "is-in"
  884. },
  885. {
  886. "_key" : "36077",
  887. "_id" : "worldEdges/36077",
  888. "_from" : "worldVertices/capital-asmara",
  889. "_to" : "worldVertices/country-eritrea",
  890. "_rev" : "_ZHpY5Mi--D",
  891. "type" : "is-in"
  892. },
  893. {
  894. "_key" : "36182",
  895. "_id" : "worldEdges/36182",
  896. "_from" : "worldVertices/capital-yamoussoukro",
  897. "_to" : "worldVertices/country-cote-d-ivoire",
  898. "_rev" : "_ZHpY5NC--B",
  899. "type" : "is-in"
  900. },
  901. {
  902. "_key" : "36008",
  903. "_id" : "worldEdges/36008",
  904. "_from" : "worldVertices/country-brunei",
  905. "_to" : "worldVertices/continent-asia",
  906. "_rev" : "_ZHpY5MO--F",
  907. "type" : "is-in"
  908. },
  909. {
  910. "_key" : "36185",
  911. "_id" : "worldEdges/36185",
  912. "_from" : "worldVertices/capital-yaounde",
  913. "_to" : "worldVertices/country-cameroon",
  914. "_rev" : "_ZHpY5NC--D",
  915. "type" : "is-in"
  916. },
  917. {
  918. "_key" : "35936",
  919. "_id" : "worldEdges/35936",
  920. "_from" : "worldVertices/continent-asia",
  921. "_to" : "worldVertices/world",
  922. "_rev" : "_ZHpY5L6--F",
  923. "type" : "is-in"
  924. },
  925. {
  926. "_key" : "36146",
  927. "_id" : "worldEdges/36146",
  928. "_from" : "worldVertices/capital-ouagadougou",
  929. "_to" : "worldVertices/country-burkina-faso",
  930. "_rev" : "_ZHpY5M2--F",
  931. "type" : "is-in"
  932. },
  933. {
  934. "_key" : "36125",
  935. "_id" : "worldEdges/36125",
  936. "_from" : "worldVertices/capital-kabul",
  937. "_to" : "worldVertices/country-afghanistan",
  938. "_rev" : "_ZHpY5My--B",
  939. "type" : "is-in"
  940. },
  941. {
  942. "_key" : "36086",
  943. "_id" : "worldEdges/36086",
  944. "_from" : "worldVertices/capital-berlin",
  945. "_to" : "worldVertices/country-germany",
  946. "_rev" : "_ZHpY5Mm--_",
  947. "type" : "is-in"
  948. },
  949. {
  950. "_key" : "35969",
  951. "_id" : "worldEdges/35969",
  952. "_from" : "worldVertices/country-argentina",
  953. "_to" : "worldVertices/continent-south-america",
  954. "_rev" : "_ZHpY5MG--_",
  955. "type" : "is-in"
  956. },
  957. {
  958. "_key" : "36017",
  959. "_id" : "worldEdges/36017",
  960. "_from" : "worldVertices/country-burundi",
  961. "_to" : "worldVertices/continent-africa",
  962. "_rev" : "_ZHpY5MS--B",
  963. "type" : "is-in"
  964. },
  965. {
  966. "_key" : "35963",
  967. "_id" : "worldEdges/35963",
  968. "_from" : "worldVertices/country-angola",
  969. "_to" : "worldVertices/continent-africa",
  970. "_rev" : "_ZHpY5MC--F",
  971. "type" : "is-in"
  972. },
  973. {
  974. "_key" : "36020",
  975. "_id" : "worldEdges/36020",
  976. "_from" : "worldVertices/country-cambodia",
  977. "_to" : "worldVertices/continent-asia",
  978. "_rev" : "_ZHpY5MS--D",
  979. "type" : "is-in"
  980. },
  981. {
  982. "_key" : "36176",
  983. "_id" : "worldEdges/36176",
  984. "_from" : "worldVertices/capital-tirana",
  985. "_to" : "worldVertices/country-albania",
  986. "_rev" : "_ZHpY5N---H",
  987. "type" : "is-in"
  988. },
  989. {
  990. "_key" : "36065",
  991. "_id" : "worldEdges/36065",
  992. "_from" : "worldVertices/country-germany",
  993. "_to" : "worldVertices/continent-europe",
  994. "_rev" : "_ZHpY5Me--F",
  995. "type" : "is-in"
  996. },
  997. {
  998. "_key" : "36164",
  999. "_id" : "worldEdges/36164",
  1000. "_from" : "worldVertices/capital-santiago",
  1001. "_to" : "worldVertices/country-chile",
  1002. "_rev" : "_ZHpY5N---_",
  1003. "type" : "is-in"
  1004. },
  1005. {
  1006. "_key" : "36155",
  1007. "_id" : "worldEdges/36155",
  1008. "_from" : "worldVertices/capital-prague",
  1009. "_to" : "worldVertices/country-czech-republic",
  1010. "_rev" : "_ZHpY5M6--B",
  1011. "type" : "is-in"
  1012. },
  1013. {
  1014. "_key" : "36029",
  1015. "_id" : "worldEdges/36029",
  1016. "_from" : "worldVertices/country-chad",
  1017. "_to" : "worldVertices/continent-africa",
  1018. "_rev" : "_ZHpY5MW--_",
  1019. "type" : "is-in"
  1020. },
  1021. {
  1022. "_key" : "35993",
  1023. "_id" : "worldEdges/35993",
  1024. "_from" : "worldVertices/country-bhutan",
  1025. "_to" : "worldVertices/continent-asia",
  1026. "_rev" : "_ZHpY5MK--F",
  1027. "type" : "is-in"
  1028. },
  1029. {
  1030. "_key" : "36026",
  1031. "_id" : "worldEdges/36026",
  1032. "_from" : "worldVertices/country-canada",
  1033. "_to" : "worldVertices/continent-north-america",
  1034. "_rev" : "_ZHpY5MS--H",
  1035. "type" : "is-in"
  1036. },
  1037. {
  1038. "_key" : "36113",
  1039. "_id" : "worldEdges/36113",
  1040. "_from" : "worldVertices/capital-copenhagen",
  1041. "_to" : "worldVertices/country-denmark",
  1042. "_rev" : "_ZHpY5Mu--B",
  1043. "type" : "is-in"
  1044. },
  1045. {
  1046. "_key" : "36158",
  1047. "_id" : "worldEdges/36158",
  1048. "_from" : "worldVertices/capital-quito",
  1049. "_to" : "worldVertices/country-ecuador",
  1050. "_rev" : "_ZHpY5M6--D",
  1051. "type" : "is-in"
  1052. },
  1053. {
  1054. "_key" : "36032",
  1055. "_id" : "worldEdges/36032",
  1056. "_from" : "worldVertices/country-chile",
  1057. "_to" : "worldVertices/continent-south-america",
  1058. "_rev" : "_ZHpY5MW--B",
  1059. "type" : "is-in"
  1060. },
  1061. {
  1062. "_key" : "36161",
  1063. "_id" : "worldEdges/36161",
  1064. "_from" : "worldVertices/capital-saint-john-s",
  1065. "_to" : "worldVertices/country-antigua-and-barbuda",
  1066. "_rev" : "_ZHpY5M6--F",
  1067. "type" : "is-in"
  1068. },
  1069. {
  1070. "_key" : "36188",
  1071. "_id" : "worldEdges/36188",
  1072. "_from" : "worldVertices/capital-zagreb",
  1073. "_to" : "worldVertices/country-croatia",
  1074. "_rev" : "_ZHpY5NC--F",
  1075. "type" : "is-in"
  1076. },
  1077. {
  1078. "_key" : "36131",
  1079. "_id" : "worldEdges/36131",
  1080. "_from" : "worldVertices/capital-luanda",
  1081. "_to" : "worldVertices/country-angola",
  1082. "_rev" : "_ZHpY5My--F",
  1083. "type" : "is-in"
  1084. },
  1085. {
  1086. "_key" : "36050",
  1087. "_id" : "worldEdges/36050",
  1088. "_from" : "worldVertices/country-ecuador",
  1089. "_to" : "worldVertices/continent-south-america",
  1090. "_rev" : "_ZHpY5Ma--D",
  1091. "type" : "is-in"
  1092. },
  1093. {
  1094. "_key" : "35954",
  1095. "_id" : "worldEdges/35954",
  1096. "_from" : "worldVertices/country-albania",
  1097. "_to" : "worldVertices/continent-europe",
  1098. "_rev" : "_ZHpY5MC--_",
  1099. "type" : "is-in"
  1100. },
  1101. {
  1102. "_key" : "35945",
  1103. "_id" : "worldEdges/35945",
  1104. "_from" : "worldVertices/continent-north-america",
  1105. "_to" : "worldVertices/world",
  1106. "_rev" : "_ZHpY5M---B",
  1107. "type" : "is-in"
  1108. },
  1109. {
  1110. "_key" : "36041",
  1111. "_id" : "worldEdges/36041",
  1112. "_from" : "worldVertices/country-croatia",
  1113. "_to" : "worldVertices/continent-europe",
  1114. "_rev" : "_ZHpY5MW--H",
  1115. "type" : "is-in"
  1116. },
  1117. {
  1118. "_key" : "35942",
  1119. "_id" : "worldEdges/35942",
  1120. "_from" : "worldVertices/continent-europe",
  1121. "_to" : "worldVertices/world",
  1122. "_rev" : "_ZHpY5M---_",
  1123. "type" : "is-in"
  1124. },
  1125. {
  1126. "_key" : "36104",
  1127. "_id" : "worldEdges/36104",
  1128. "_from" : "worldVertices/capital-bujumbura",
  1129. "_to" : "worldVertices/country-burundi",
  1130. "_rev" : "_ZHpY5Mq--D",
  1131. "type" : "is-in"
  1132. },
  1133. {
  1134. "_key" : "36071",
  1135. "_id" : "worldEdges/36071",
  1136. "_from" : "worldVertices/capital-algiers",
  1137. "_to" : "worldVertices/country-algeria",
  1138. "_rev" : "_ZHpY5Mi--_",
  1139. "type" : "is-in"
  1140. },
  1141. {
  1142. "_key" : "35939",
  1143. "_id" : "worldEdges/35939",
  1144. "_from" : "worldVertices/continent-australia",
  1145. "_to" : "worldVertices/world",
  1146. "_rev" : "_ZHpY5L6--H",
  1147. "type" : "is-in"
  1148. },
  1149. {
  1150. "_key" : "36035",
  1151. "_id" : "worldEdges/36035",
  1152. "_from" : "worldVertices/country-colombia",
  1153. "_to" : "worldVertices/continent-south-america",
  1154. "_rev" : "_ZHpY5MW--D",
  1155. "type" : "is-in"
  1156. },
  1157. {
  1158. "_key" : "36134",
  1159. "_id" : "worldEdges/36134",
  1160. "_from" : "worldVertices/capital-manama",
  1161. "_to" : "worldVertices/country-bahrain",
  1162. "_rev" : "_ZHpY5My--H",
  1163. "type" : "is-in"
  1164. },
  1165. {
  1166. "_key" : "36128",
  1167. "_id" : "worldEdges/36128",
  1168. "_from" : "worldVertices/capital-la-paz",
  1169. "_to" : "worldVertices/country-bolivia",
  1170. "_rev" : "_ZHpY5My--D",
  1171. "type" : "is-in"
  1172. },
  1173. {
  1174. "_key" : "36140",
  1175. "_id" : "worldEdges/36140",
  1176. "_from" : "worldVertices/capital-n-djamena",
  1177. "_to" : "worldVertices/country-chad",
  1178. "_rev" : "_ZHpY5M2--B",
  1179. "type" : "is-in"
  1180. },
  1181. {
  1182. "_key" : "36092",
  1183. "_id" : "worldEdges/36092",
  1184. "_from" : "worldVertices/capital-brasilia",
  1185. "_to" : "worldVertices/country-brazil",
  1186. "_rev" : "_ZHpY5Mm--D",
  1187. "type" : "is-in"
  1188. },
  1189. {
  1190. "_key" : "36098",
  1191. "_id" : "worldEdges/36098",
  1192. "_from" : "worldVertices/capital-brussels",
  1193. "_to" : "worldVertices/country-belgium",
  1194. "_rev" : "_ZHpY5Mq--_",
  1195. "type" : "is-in"
  1196. },
  1197. {
  1198. "_key" : "36179",
  1199. "_id" : "worldEdges/36179",
  1200. "_from" : "worldVertices/capital-vienna",
  1201. "_to" : "worldVertices/country-austria",
  1202. "_rev" : "_ZHpY5NC--_",
  1203. "type" : "is-in"
  1204. },
  1205. {
  1206. "_key" : "36083",
  1207. "_id" : "worldEdges/36083",
  1208. "_from" : "worldVertices/capital-beijing",
  1209. "_to" : "worldVertices/country-people-s-republic-of-china",
  1210. "_rev" : "_ZHpY5Mi--H",
  1211. "type" : "is-in"
  1212. },
  1213. {
  1214. "_key" : "36068",
  1215. "_id" : "worldEdges/36068",
  1216. "_from" : "worldVertices/country-people-s-republic-of-china",
  1217. "_to" : "worldVertices/continent-asia",
  1218. "_rev" : "_ZHpY5Me--H",
  1219. "type" : "is-in"
  1220. },
  1221. {
  1222. "_key" : "36095",
  1223. "_id" : "worldEdges/36095",
  1224. "_from" : "worldVertices/capital-bridgetown",
  1225. "_to" : "worldVertices/country-barbados",
  1226. "_rev" : "_ZHpY5Mm--F",
  1227. "type" : "is-in"
  1228. },
  1229. {
  1230. "_key" : "36167",
  1231. "_id" : "worldEdges/36167",
  1232. "_from" : "worldVertices/capital-sarajevo",
  1233. "_to" : "worldVertices/country-bosnia-and-herzegovina",
  1234. "_rev" : "_ZHpY5N---B",
  1235. "type" : "is-in"
  1236. },
  1237. {
  1238. "_key" : "36170",
  1239. "_id" : "worldEdges/36170",
  1240. "_from" : "worldVertices/capital-sofia",
  1241. "_to" : "worldVertices/country-bulgaria",
  1242. "_rev" : "_ZHpY5N---D",
  1243. "type" : "is-in"
  1244. },
  1245. {
  1246. "_key" : "35972",
  1247. "_id" : "worldEdges/35972",
  1248. "_from" : "worldVertices/country-australia",
  1249. "_to" : "worldVertices/continent-australia",
  1250. "_rev" : "_ZHpY5MG--B",
  1251. "type" : "is-in"
  1252. },
  1253. {
  1254. "_key" : "35984",
  1255. "_id" : "worldEdges/35984",
  1256. "_from" : "worldVertices/country-bangladesh",
  1257. "_to" : "worldVertices/continent-asia",
  1258. "_rev" : "_ZHpY5MK--_",
  1259. "type" : "is-in"
  1260. },
  1261. {
  1262. "_key" : "35999",
  1263. "_id" : "worldEdges/35999",
  1264. "_from" : "worldVertices/country-bosnia-and-herzegovina",
  1265. "_to" : "worldVertices/continent-europe",
  1266. "_rev" : "_ZHpY5MO--_",
  1267. "type" : "is-in"
  1268. },
  1269. {
  1270. "_key" : "36047",
  1271. "_id" : "worldEdges/36047",
  1272. "_from" : "worldVertices/country-denmark",
  1273. "_to" : "worldVertices/continent-europe",
  1274. "_rev" : "_ZHpY5Ma--B",
  1275. "type" : "is-in"
  1276. },
  1277. {
  1278. "_key" : "36044",
  1279. "_id" : "worldEdges/36044",
  1280. "_from" : "worldVertices/country-czech-republic",
  1281. "_to" : "worldVertices/continent-europe",
  1282. "_rev" : "_ZHpY5Ma--_",
  1283. "type" : "is-in"
  1284. },
  1285. {
  1286. "_key" : "36080",
  1287. "_id" : "worldEdges/36080",
  1288. "_from" : "worldVertices/capital-bandar-seri-begawan",
  1289. "_to" : "worldVertices/country-brunei",
  1290. "_rev" : "_ZHpY5Mi--F",
  1291. "type" : "is-in"
  1292. },
  1293. {
  1294. "_key" : "36122",
  1295. "_id" : "worldEdges/36122",
  1296. "_from" : "worldVertices/capital-helsinki",
  1297. "_to" : "worldVertices/country-finland",
  1298. "_rev" : "_ZHpY5My--_",
  1299. "type" : "is-in"
  1300. },
  1301. {
  1302. "_key" : "35987",
  1303. "_id" : "worldEdges/35987",
  1304. "_from" : "worldVertices/country-barbados",
  1305. "_to" : "worldVertices/continent-north-america",
  1306. "_rev" : "_ZHpY5MK--B",
  1307. "type" : "is-in"
  1308. },
  1309. {
  1310. "_key" : "36173",
  1311. "_id" : "worldEdges/36173",
  1312. "_from" : "worldVertices/capital-thimphu",
  1313. "_to" : "worldVertices/country-bhutan",
  1314. "_rev" : "_ZHpY5N---F",
  1315. "type" : "is-in"
  1316. },
  1317. {
  1318. "_key" : "36152",
  1319. "_id" : "worldEdges/36152",
  1320. "_from" : "worldVertices/capital-phnom-penh",
  1321. "_to" : "worldVertices/country-cambodia",
  1322. "_rev" : "_ZHpY5M6--_",
  1323. "type" : "is-in"
  1324. },
  1325. {
  1326. "_key" : "36014",
  1327. "_id" : "worldEdges/36014",
  1328. "_from" : "worldVertices/country-burkina-faso",
  1329. "_to" : "worldVertices/continent-africa",
  1330. "_rev" : "_ZHpY5MS--_",
  1331. "type" : "is-in"
  1332. },
  1333. {
  1334. "_key" : "36149",
  1335. "_id" : "worldEdges/36149",
  1336. "_from" : "worldVertices/capital-paris",
  1337. "_to" : "worldVertices/country-france",
  1338. "_rev" : "_ZHpY5M2--H",
  1339. "type" : "is-in"
  1340. }
  1341. ]
  1342. true

Hide execution results

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:

Higher volume graph examples

All of the above examples are rather small so they are easier to comprehend andcan demonstrate the way the functionality works. There are however severaldatasets freely available on the web that are a lot bigger.We collected some of them with import scriptsso you may play around with them. Another huge graph is thePokec social networkfrom Slovakia that weused for performance testing on several databases;You will find importing scripts etc. in this blogpost.