Storing multiple graphs in Neo4J -


i have application stores relationship information in mysql table (contact_id, other_contact_id, strength, recorded_at). fine if need show contact's relationships or generate list of mutual contacts 2 contacts.

but need generate stats like: 'what total number of 2-way connections of strength 3 or better in january 2011' or (assuming each contact part of group) 'which group has number of connections other groups' etc.

i found sql generating these stats became unwieldy real fast.

so wrote script given date generate graph in memory. run whatever stat wanted against graph. easier understand , in general, more performant -- except generating graph part.

my next thought cache graphs call on them whenever needed run new stat (or generate later graph: eg today's graph take yesterday's graph , apply changes happened since yesterday). tried memcached worked great until graphs grew > 1 mb.

so i'm thinking using graph database neo4j.

only problem is, don't have 1 graph. or do, 1 changes on time , need able query different reference times.

so, can i:

  • store multiple graphs in neo4j , rertrieve/interact them separately? create , store separate social graphs each date.

or

  • add valid , timestamps each edge , filter graph appropriately: if wanted graph "may 1st" follow newest edge between 2 noeds created before "may 1st" (and if edges created after may 1st nodes wouldn't connected).

i'm pretty new graph databases help/pointers/hints appreciated.

right can store 1 graph database in single neo4j instance, 1 graphdb can contain many different sub-graphs like. have keep in mind when doing global operations (like index queries) there can compound queries include timestamped properties limit results.

one way of doing is, said adding temporal information edges represent structure of graph given date can traverse structure of graph then.

reference node has different meaning in neo4j.

using category nodes per day (and linking them , aggregating them higher level timespans) more graphy way of categorizing nodes indexed properties. (effectively these in-graph indices can include in traversals , graph queries).

you don't have duplicate nodes long interested in different temporal structures. if nodes different (e.g. changing properties, either duplicate them, , creating different subgraphs) or create connected list of history nodes on each node contain changes (or full snapshot depending on requirements).

your domain sounds fitting graph database. if have more , detailed questions feel free join neo4j mailing list.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -