1
0
Fork 0
arangodb/Documentation/Books/Users/General-Graphs/Management.mdpp

144 lines
3.7 KiB
Plaintext

!CHAPTER Graph Management
Before we create our first graph, the philosophy of handling the graph content has to be introduced.
A graph contains of a set of edge definitions each referring to one [edge collection](../Glossary/index.html#edge_collection) and
defining constraints on the vertex collections used as start and end points of the edges.
Furthermore a graph can contain an arbitrary amount of vertex collections, called orphan collections, that are not used in any edge definition but should be managed by the graph.
In order to create a non empty graph the functionality to create edge definitions has to be introduced first:
!SECTION Edge Definitions
An edge definition is always a directed relation of a graph. Each graph can have arbitrary many relations defined within the edge definitions array.
!SUBSECTION Initialize the list
@startDocuBlock JSF_general_graph_edge_definitions
!SUBSECTION Extend the list
@startDocuBlock JSF_general_graph_extend_edge_definitions
!SUBSUBSECTION Relation
@startDocuBlock JSF_general_graph_relation
!SUBSUBSECTION Undirected Relation
**Warning: Deprecated**
This function is deprecated and will be removed soon.
Please use [Relation](../General-Graphs/Management.html#relation) instead.
@startDocuBlock JSF_general_graph_undirectedRelation
!SUBSUBSECTION Directed Relation
**Warning: Deprecated**
This function is deprecated and will be removed soon.
Please use [Relation](../General-Graphs/Management.html#relation) instead.
@startDocuBlock JSF_general_graph_directedRelation
!SECTION Create a graph
After having introduced edge definitions a graph can be created.
@startDocuBlock JSF_general_graph_create
!SUBSUBSECTION Complete Example to create a graph
Example Call:
@startDocuBlock JSF_general_graph_create_graph_example1
alternative call:
@startDocuBlock JSF_general_graph_create_graph_example2
!SUBSECTION List available graphs
@startDocuBlock JSF_general_graph_list
!SUBSECTION Load a graph
@startDocuBlock JSF_general_graph_graph
!SUBSECTION Remove a graph
@startDocuBlock JSF_general_graph_drop
!SECTION Modify a graph definition during runtime
After you have created an graph its definition is not immutable.
You can still add, delete or modify edge definitions and vertex collections.
!SUBSECTION Extend the edge definitions
@startDocuBlock JSF_general_graph__extendEdgeDefinitions
!SUBSECTION Modify an edge definition
@startDocuBlock JSF_general_graph__editEdgeDefinition
!SUBSECTION Delete an edge definition
@startDocuBlock JSF_general_graph__deleteEdgeDefinition
!SUBSECTION Extend vertex Collections
Each graph can have an arbitrary amount of vertex collections, which are not part of any edge definition of the graph.
These collections are called orphan collections.
If the graph is extended with an edge definition using one of the orphans,
it will be removed from the set of orphan collection automatically.
!SUBSUBSECTION Add
@startDocuBlock JSF_general_graph__addVertexCollection
!SUBSUBSECTION Get
@startDocuBlock JSF_general_graph__orphanCollections
!SUBSUBSECTION Remove
@startDocuBlock JSF_general_graph__removeVertexCollection
!SECTION Vertex
!SUBSECTION Save
@startDocuBlock JSF_general_graph_vertex_collection_save
!SUBSECTION Replace
@startDocuBlock JSF_general_graph_vertex_collection_replace
!SUBSECTION Update
@startDocuBlock JSF_general_graph_vertex_collection_update
!SUBSECTION Remove
@startDocuBlock JSF_general_graph_vertex_collection_remove
!SECTION Edge
!SUBSECTION Save
@startDocuBlock JSF_general_graph_edge_collection_save
!SUBSECTION Replace
@startDocuBlock JSF_general_graph_edge_collection_replace
!SUBSECTION Update
@startDocuBlock JSF_general_graph_edge_collection_update
!SUBSECTION Remove
@startDocuBlock JSF_general_graph_edge_collection_remove