1
0
Fork 0
arangodb/Documentation/Books/Users/General-Graphs
Willi Goesgens 388592b8f7 Hook in stray docuBlocks 2015-08-13 18:54:38 +02:00
..
FluentAQLInterface.mdpp
Functions.mdpp
Management.mdpp
README.mdpp

README.mdpp

!CHAPTER Graphs

This chapter describes the general-graph module.
It allows you to define a graph that is spread across several edge and document collections.
This allows you to structure your models in line with your domain and group them logically in collections giving you the power to query them in the same graph queries.
There is no need to include the referenced collections within the query, this module will handle it for you.

!SECTION First Steps with Graphs

A Graph consists of *vertices* and *edges*. Edges are stored as documents in *edge
collections*. In general a vertex is stored in a document collection.
The type of edges that are allowed within a graph is defined by *edge definitions*:
An edge definition is a combination of an [edge collection](../Glossary/index.html#edge_collection), and the vertex collections that the edges within this collection can connect.
A graph can have an arbitrary number of edge definitions and arbitrary many additional vertex collections.

!SUBSECTION Warning

The underlying collections of the graph 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 will be deleted, you will never have loose ends
* If you insert an edge it is checked if the edge matches the definition, your edge collections will only contain valid edges

These guarantees are lost if you access the collections in any other way than the graph module or AQL, so if you delete documents from your vertex collections directly, the edges will be untouched.

!SUBSUBSECTION Three Steps to create a graph

@startDocuBlock JSF_general_graph_how_to_create