graph-databases

Loading a Neo4j subgraph into Networkx

人走茶凉 提交于 2019-12-02 21:43:07
I have been dealing with Neo4j through python's Bulbflow and now need a way to save/export subgraphs. I have seen Java and even Ruby approaches for doing this, however a simple Python approach seems to be hiding from me.. So far, I have found two potential paths: Accessing Geoff through py2neo , but there is surprisingly little documentation for extracting a subgraph from a big local neo4j database or from a neo4jserver. Using Networkx : I found networkx can load graphs from many different formats (I am unsure which format neo4j stores their dbs), however I haven't found a way to extract a

Titan vertex centric indices vs Neo4j labels

白昼怎懂夜的黑 提交于 2019-12-02 19:39:30
I was trying to make a comparison between these two technologies when approaching this and I was wondering if any of you already have some experience dealing with any or both of them? I am mainly interested in performance numbers when dealing with similar use cases. Agreeing with everything Marko said, one could take it further and argue that in the graph database world local indexes can (and even should) substitute global ones. In my opinion, the single greatest advantage of a graph data model is that it lets you encode your data model into the graph topology, gaining qualitative advantages

How to Model Real-World Relationships in a Graph Database (like Neo4j)?

我与影子孤独终老i 提交于 2019-12-02 18:16:15
I have a general question about modeling in a graph database that I just can't seem to wrap my head around. How do you model this type of relationship: "Newton invented Calculus"? In a simple graph , you could model it like this: Newton (node) -> invented (relationship) -> Calculus (node) ...so you'd have a bunch of "invented" graph relationships as you added more people and inventions. The problem is, you start needing to add a bunch of properties to the relationship: invention_date influential_concepts influential_people books_inventor_wrote ...and you'll want to start creating relationships

Copy relationships of different type using Cypher

不想你离开。 提交于 2019-12-02 17:51:44
问题 I want to copy existing relationships to a new node. All nodes exist already and I would like to copy all incoming relationships to a second node. Given a node D and a graph like A -[r]-> B <-[s]- C I would like to create the following in a single Cypher query: A -[r]-> B <-[s]- C A -[r]-> D <-[s]- C Only the relationships in the second line should be created, as all other nodes exist already. I have tried the following Cypher query (which is an Invalid query ( Don't know how to extract

What .NET-compatible graph database solution(s) have a proven track record?

不羁岁月 提交于 2019-12-02 17:06:32
I am looking for a generic graph database solution that has existing .NET-compatible infrastructure and a proven track record. I've found links to several options on Google and SO, but not a lot of information on existing implementations and usages in real-world applications. I've also considered using a hybrid between a document DB (like RavenDB or MongoDB ) and a dedicated Triple Store or RDBMS (like SQL), and augmenting the data store in order to support the functionality I want. However, this is probably quite a bit of work, and my hope is that someone else has done it already. What I've

Neo4j super node issue - fanning out pattern

心已入冬 提交于 2019-12-02 16:42:00
I'm new to the Graph Database scene, looking into Neo4j and learning Cypher, we're trying to model a graph database, it's a fairly simple one, we got users , and we got movies , users can VIEW movies , RATE movies , create playlists and playlists can HAVE movies . The question is regarding the Super Node performance issue. And I will quote something from a very good book I am currently reading - Learning Neo4j by Rik Van Bruggen , so here it is: A very interesting problem then occurs in datasets where some parts of the graph are all connected to the same node. This node, also referred to as a

Graph databases and RDF triplestores: storage of graph data in python

那年仲夏 提交于 2019-12-02 15:56:22
I need to develop a graph database in python (I would enjoy if anybody can join me in the development. I already have a bit of code, but I would gladly discuss about it). I did my research on the internet. in Java, neo4j is a candidate, but I was not able to find anything about actual disk storage. In python, there are many graph data models (see this pre-PEP proposal, but none of them satisfy my need to store and retrieve from disk. I do know about triplestores, however. triplestores are basically RDF databases, so a graph data model could be mapped in RDF and stored, but I am generally

gremlin syntax to calculate Jaccard similarity metric

允我心安 提交于 2019-12-02 11:48:50
I'm interested in calculating the Jaccard similarity metric for all pairs of vertices in a graph that are not directly connected. The Jaccard metric is defined as the norm of the intersection of the neighbors of the two vertices divided by the norm of the union of the same sets. where So far I have been able to get all pairs of nodes not directly connected (only interested in this case for link prediction, if a direct link already exists then I do not need to calculate the Jaccard metric) such that for a pair (x, y) where x not equals y: g.V().as('v1').V().where(neq('v1')).as('v2').filter(__

Copy relationships of different type using Cypher

≡放荡痞女 提交于 2019-12-02 09:46:38
I want to copy existing relationships to a new node. All nodes exist already and I would like to copy all incoming relationships to a second node. Given a node D and a graph like A -[r]-> B <-[s]- C I would like to create the following in a single Cypher query: A -[r]-> B <-[s]- C A -[r]-> D <-[s]- C Only the relationships in the second line should be created, as all other nodes exist already. I have tried the following Cypher query (which is an Invalid query ( Don't know how to extract parameters from this type: org.neo4j.kernel.impl.core.RelationshipProxy )): START targetNode = node(42)

OrientDB Query by edge property

旧城冷巷雨未停 提交于 2019-12-02 04:44:10
I have two vertex classes: Location and User and I have two edges also: Friend and GoingTo. A User can be 'Friend' with another User and a User can also 'GoingTo' a Location. The edge GoingTo has a datetime property called going_date with the date the user is going to the Location. I want to return every ‘Location’ that has a in(“GoingTo”) edge from an ‘User’ that is a (“Friend”) of a specific starting ‘User’ (#12:11 as example). What I have here is all locations but without the date property of goingTo... SELECT expand(both('Friend').out('goingTo')) FROM #12:11 How can I query by this edge