arangosh> db._create("vertex");
[ArangoCollection 98330, "vertex" (type document, status loaded)]
arangosh> db._createEdgeCollection("relation");
[ArangoCollection 98336, "relation" (type edge, status loaded)]
arangosh> var myGraph = {};
arangosh> myGraph.v1 = db.vertex.insert({ name : "vertex 1" });
{
"_id" : "vertex/98343",
"_key" : "98343",
"_rev" : "_YQtDXDe--B"
}
arangosh> myGraph.v2 = db.vertex.insert({ name : "vertex 2" });
{
"_id" : "vertex/98347",
"_key" : "98347",
"_rev" : "_YQtDXDi--_"
}
arangosh> myGraph.e1 = db.relation.insert(myGraph.v1, myGraph.v2,
........> { label : "knows"});
{
"_id" : "relation/98350",
"_key" : "98350",
"_rev" : "_YQtDXDi--B"
}
arangosh> db._document(myGraph.e1);
{
"_key" : "98350",
"_id" : "relation/98350",
"_from" : "vertex/98343",
"_to" : "vertex/98347",
"_rev" : "_YQtDXDi--B",
"label" : "knows"
}
arangosh> db.relation.edges(myGraph.e1._id);
[ ]