graph-databases

Integrating mongodb with neo4j, is there any API that will link them?

[亡魂溺海] 提交于 2019-12-03 08:51:37
问题 I am working on a recommendation engine. The user data is collected (Their friendship, locations, likes,education,...) and is already stored in mongodb. I need to recommend relevant products to these users. I am planning on using neo4j for the recommender engine for obvious reasons (ease of traversal between nodes, path information,..). The problem is that I have to first convert the mongodb data into neo4j nodes/relationships, process the data and send the results back to the mongodb

In Cypher, how can I create a relationship if it doesn't exist; update property if it does

旧巷老猫 提交于 2019-12-03 08:39:49
问题 In Cypher in Neo4J, given two nodes, if there's no relationship between them, I'd like to create a relationship (of type Foo) with a weight property of one. If this relationship already exists, I'd like to increment its weight property. Is there a good way to do this in a single Cypher query? Thanks! Edit: Some additional details: The nodes are already created, unique, and in an index. 回答1: This is exactly why we added CREATE UNIQUE in 1.8. START a=node(...), b=node(...) CREATE UNIQUE a-[r

Titan vertex centric indices vs Neo4j labels

試著忘記壹切 提交于 2019-12-03 07:08:05
问题 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. 回答1: 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

Loading a Neo4j subgraph into Networkx

末鹿安然 提交于 2019-12-03 07:01:25
问题 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

Representing (and incrementing) relationship strength in Neo4j

孤街醉人 提交于 2019-12-03 06:27:45
I would like to represent the changing strength of relationships between nodes in a Neo4j graph. For a static graph, this is easily done by setting a "strength" property on the relationship: A --knows--> B | strength | 3 However, for a graph that needs updating over time, there is a problem, since incrementing the value of the property can't be done atomically (via the REST interface) since a read-before-write is required. Incrementing (rather than merely updating) is necessary if the graph is being updated in response to incoming streamed data. I would need to either ensure that only one REST

What is the fastest ArangoDB friends-of-friends query (with count)

[亡魂溺海] 提交于 2019-12-03 05:00:39
I'm trying to use ArangoDB to get a list of friends-of-friends. Not just a basic friends-of-friends list, I also want to know how many friends the user and the friend-of-a-friend have in common and sort the result. After several attempts at (re)writing the best performing AQL query, this is what I ended up with: LET friends = ( FOR f IN GRAPH_NEIGHBORS('graph', @user, {"direction": "any", "includeData": true, "edgeExamples": { name: "FRIENDS_WITH"}}) RETURN f._id ) LET foafs = (FOR friend IN friends FOR foaf in GRAPH_NEIGHBORS('graph', friend, {"direction": "any", "includeData": true,

Neo4j super node issue - fanning out pattern

情到浓时终转凉″ 提交于 2019-12-03 04:15:14
问题 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

What is the difference between triplestores and graph databases?

混江龙づ霸主 提交于 2019-12-03 03:44:05
问题 There are triplestores (semantic databases), and there are general-purpose graph databases. Both are based on the similar concepts of linking one "item" to another via a relationship. Triplestores support RDF and are queried by SPARQL, but such add-ons can be (and are) implemented ontop of general-purpose graph databases as well. What is the fundamental difference that would make you prefer a semantic db / triplestore to a general purpose graph database like neo4j? 回答1: Triples stores are

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

送分小仙女□ 提交于 2019-12-03 02:23:59
问题 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

How to decide which NoSQL technology to use?

家住魔仙堡 提交于 2019-12-03 00:49:40
问题 What is the pros and cons of MongoDB (document-based), HBase (column-based) and Neo4j (objects graph)? I'm particularly interested to know some of the typical use cases for each one. What are good examples of problems that graphs can solve better than the alternative? Maybe any Slideshare or Scribd worthy presentation? 回答1: MongoDB Scalability: Highly available and consistent but sucks at relations and many distributed writes. It's primary benefit is storing and indexing schemaless documents.