arangosh> db._create("vertex");
[ArangoCollection 4006191035, "vertex" (type document, status loaded)]
arangosh> db._createEdgeCollection("relation");
[ArangoCollection 4006322107, "relation" (type edge, status loaded)]
arangosh> myGraph.v1 = db.vertex.insert({ name : "vertex 1" });
{
"_id" : "vertex/4006649787",
"_rev" : "4006649787",
"_key" : "4006649787"
}
arangosh> myGraph.v2 = db.vertex.insert({ name : "vertex 2" });
{
"_id" : "vertex/4006846395",
"_rev" : "4006846395",
"_key" : "4006846395"
}
arangosh> myGraph.e1 = db.relation.insert(myGraph.v1, myGraph.v2,
........> { label : "knows"});
{
"_id" : "relation/4007174075",
"_rev" : "4007174075",
"_key" : "4007174075"
}
arangosh> db._document(myGraph.e1);
{
"label" : "knows",
"_id" : "relation/4007174075",
"_rev" : "4007174075",
"_key" : "4007174075",
"_from" : "vertex/4006649787",
"_to" : "vertex/4006846395"
}
arangosh> db.relation.edges(myGraph.e1._id);
[ ]