graph-databases

Can Graph DBs perform well with unspecified end nodes?

核能气质少年 提交于 2021-02-11 16:11:38
问题 I have been experimenting with neo4j for a very specific scenario and I have been unable to get it to perform well - queries take minutes to return. I am wondering if this is a case of the wrong technology for the job? A simplified version of my scenario is below. I have Town s that are linked to each other via routes. Each route has a distance. The question I'm trying to ask is: calculate the shortest route from Town A to every other town reachable from Town A . In this scenario, there are

GraphDB: Node as a property of a relationship

蹲街弑〆低调 提交于 2021-02-10 14:13:59
问题 I am trying to analyze graphDB as an alternative to RDBMS for a problem domain. Here is the analogy of a problem I am trying to solve. P:Michael and P:Angela r:like_to_eat G:Apple and G:Bread . G:Apple and G:Bread are r:available_in S:Walmart and S:Whole Foods . So far it's straightforward. Here is an image that I think best expresses the graph. The problem is when I try to specify that Angela likes Apples from Whole Foods and Bread from Walmart. And Michael likes to eat Apples from Walmart

Cypher: Shortest Path with Constraint

主宰稳场 提交于 2021-02-08 10:57:15
问题 I want to perform a shortest path query like the following: START source=node:myIndex(name="<src>"), destination=node:myIndex(name = "<dst>") MATCH p = shortestPath(source-[:REL1*..5]-destination), source-[sourceRel:REL1]-m, destination-[destRel:REL1]-k WHERE sourceRel.a=<someValue> and destRel.a=<someOtherValue> RETURN NODES(p); I want to get the shortest path between <src> and <dst> with the constraint that the property a has a certain value on the first relationship from src and dst

Cypher: Shortest Path with Constraint

谁都会走 提交于 2021-02-08 10:56:08
问题 I want to perform a shortest path query like the following: START source=node:myIndex(name="<src>"), destination=node:myIndex(name = "<dst>") MATCH p = shortestPath(source-[:REL1*..5]-destination), source-[sourceRel:REL1]-m, destination-[destRel:REL1]-k WHERE sourceRel.a=<someValue> and destRel.a=<someOtherValue> RETURN NODES(p); I want to get the shortest path between <src> and <dst> with the constraint that the property a has a certain value on the first relationship from src and dst

Return All Nodes in Shortest Path as Object List

假如想象 提交于 2021-02-07 07:17:34
问题 I have the following Cypher Query which works fine in the Neo4j 2.0.0. MATCH (ab:Point { Latitude: 24.96325, Longitude: 67.11343 }),(cd:Point { Latitude: 24.95873, Longitude: 67.10335 }), p = shortestPath((ab)-[*..150]-(cd)) RETURN p The following Query in Neo4jClient gives the error: Function Evaluation Timed out. var pathsQuery = client.Cypher .Match("(ab:Point { Latitude: 24.96325, Longitude: 67.11343 }),(cd:Point { Latitude: 24.95873, Longitude: 67.10335 }), p = shortestPath((ab)-[*..150]

Gremlin case insensitive search

自作多情 提交于 2021-01-29 17:45:41
问题 I am new to Gremlin and I am using the Gremlin console to read data from a graph database. In the graph, there are vertices with label "Device". These vertices have a property "name" associated with them. I need to find out if there is a vertex that has a certain name. This check has to be case insensitive. Suppose I was to do this in a relational database, I could write the following query: SELECT * FROM device d WHERE LOWER(d.name) = 'mydevice' I am searching for a function similar to

Graph Database or Relational Database Common Table Extensions: Comparing acyclic graph query performance

♀尐吖头ヾ 提交于 2021-01-29 10:09:07
问题 Are graph databases more performant than relational databases for highly connected acyclic graph data? I need to significantly speed up my query results and hope that graph databases will be the answer. I had seen significant improvement in my relational database queries when I used Common Table Extensions bringing a recursive search of my sample data from 16 hours to 30 minutes. Still, 30 minutes is way too long for a web application and trying to work around that kind of response gets

gremlin filter on Hashmap property without using a lambda

痴心易碎 提交于 2021-01-28 18:54:11
问题 If I have a vertex in a graph database where one of the properties is a map, is there a way to filter on properties of the map without using a lambda? Create the vertex like this: gremlin> v = graph.addVertex(label, 'LABEL') ==>v[68] gremlin> g.V(68).property('prop', [ key: 'val' ]) ==>v[68] gremlin> g.V(68).valueMap() ==>{prop=[{key=val}]} Is there a way to filter for vertices by prop.key == 'val' without using a lambda? gremlin> g.V().filter{ it.get().values('prop').next().get('key') ==

Gremlin : AWS Neptune - Get all Leaf Nodes for each Node in the Graph as CSV

余生颓废 提交于 2021-01-28 07:23:10
问题 I have a simple graph that has Nodes which represent duplicate record id in the below form Duplicate Id, Original Id A,B B,C C,D X,Y Y,Z The directed graph looks like A -> B ->C ->D and I want CSV result that looks like below that has each Node with ultimate leaf node with no more outgoing edges A,D B,D C,D X,Z Y,Z The above is a simplistic scenario to explain the problem however actual data will have more complex scenarios like below where I have 24 Nodes from A to X with each node connect

Fast in-memory graph database

感情迁移 提交于 2021-01-28 04:01:45
问题 Does anyone know of a good solution out there that can deal with processing a graph of interconnected nodes? For our purpose the nodes are locations and we move material with various attributes between these locations. At some point a user may need to query what material is at a particular location, where it came from etc. What I need to do is walk the graph/tree and sum up quantities along the way depending on what a user requests. I was thinking an in-memory graph database or alternatively