Hi Dnorric, you probably already saw https://docs.arangodb.com/3.0/Manual/Graphs/index.html
which is intended to get you started on using graphs. Quoting https://github.com/arangodb/arangodb/blob/devel/js/common/modules/%40arangodb/graph-examples/example-graph.js with it creating a graph spread across several edge and vertex collections: var createRoutePlannerGraph = function () { var edgeDefinition = []; edgeDefinition.push(Graph._relation( 'germanHighway', ['germanCity'], ['germanCity']) ); edgeDefinition.push( Graph._relation('frenchHighway', ['frenchCity'], ['frenchCity']) ); edgeDefinition.push(Graph._relation( 'internationalHighway', ['frenchCity', 'germanCity'], ['frenchCity', ' germanCity']) ); var g = Graph._create('routeplanner', edgeDefinition); var berlin = g.germanCity.save({_key: 'Berlin', population: 3000000, isCapital: true, loc: [52.5167, 13.3833]}); var cologne = g.germanCity.save({_key: 'Cologne', population: 1000000, isCapital: false, loc: [50.9364, 6.9528]}); var hamburg = g.germanCity.save({_key: 'Hamburg', population: 1000000, isCapital: false, loc: [53.5653, 10.0014]}); var lyon = g.frenchCity.save({_key: 'Lyon', population: 80000, isCapital: false, loc: [45.7600, 4.8400]}); var paris = g.frenchCity.save({_key: 'Paris', population: 4000000, isCapital : true, loc: [48.8567, 2.3508]}); g.germanCity.ensureGeoIndex('loc'); g.frenchCity.ensureGeoIndex('loc'); g.germanHighway.save(berlin._id, cologne._id, {distance: 850}); g.germanHighway.save(berlin._id, hamburg._id, {distance: 400}); g.germanHighway.save(hamburg._id, cologne._id, {distance: 500}); g.frenchHighway.save(paris._id, lyon._id, {distance: 550}); g.internationalHighway.save(berlin._id, lyon._id, {distance: 1100}); g.internationalHighway.save(berlin._id, paris._id, {distance: 1200}); g.internationalHighway.save(hamburg._id, paris._id, {distance: 900}); g.internationalHighway.save(hamburg._id, lyon._id, {distance: 1300}); g.internationalHighway.save(cologne._id, lyon._id, {distance: 700}); g.internationalHighway.save(cologne._id, paris._id, {distance: 550}); return g; }; Cheers, Willi On Tuesday, August 2, 2016 at 7:23:49 AM UTC+2, 25dnorric wrote: > > Hi im new graph databases. I would like to create a simple cookbook > database where there is a recipe collection and an ingredient collection. > With a directed edge collection contains between recipe and ingredeint. > There would also be a pantry collection with directed edge from pantry to > ingredeint called contains. > My question is is it possible to list those recipe for which i have > ingredients in the pantry and to order the list of recipes by those recipes > for which i have the most ingredients > Cheers > Damian > -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
