graph-databases

using multiple match clauses doesn't return any result in neo4j cypher query

依然范特西╮ 提交于 2019-12-12 04:58:37
问题 I am executing the following two queries and i am getting some result. First query START person=node:NODE_TYPE(NODE_TYPE='PERSON') MATCH (person)-[?:contacts]->(var1)-[?:addresses]->(var2)-[?:details]->(var3)-[?:items]->(var4)-[?:items]->(var5)-[?:value]->(var6) WHERE var2.`#nodeId` ='at0000' and var3.`#nodeId` ='at0001' and var4.`#nodeId` ='at0002' and var5.`#nodeId` ='at0028' and var6.`value` =~'address.*' return distinct person; Second query START person=node:NODE_TYPE(NODE_TYPE='PERSON')

Neo4j Cypher delete query

梦想与她 提交于 2019-12-12 04:45:37
问题 I have a following Neo4j Cypher query for Decision entity deleting: MATCH (d:Decision) WHERE id(d) IN {decisionsIds} OPTIONAL MATCH (d)-[r]-(t) DELETE d, r WITH t, r WHERE NOT (id(t) IN {decisionsIds}) OPTIONAL MATCH (t)-[r2:VOTED_ON|:CREATED_BY|:VOTED_FOR]-() WHERE r2 <> r WITH t, r2 WHERE none(x in labels(t) WHERE x in ['User', 'Decision']) DELETE t, r2 Previously I had a Vote entity with relationships VOTED_ON and VOTED_FOR to entities Criterion and Decision . Also, Vote has relationship

Transform between relational database and graph-based database

北慕城南 提交于 2019-12-12 04:00:50
问题 I am aware that there are algorithms (and even tools) to transform relational databases (RDBMS) to Graph databases, and the other way around. I do have several questions that are a bit larger than that: Is there a common-practice working algorithm out there for such transformation, for example RDBMS => graph (or several)? Is this algorithm bijective? To be more precise: 2.1. Given said algorithm, is the transformation RDBMS => graph injective (one-to-one)? More plainly, can there be any two

ArangoDB Java API create database not working in 3.1.RC3

本小妞迷上赌 提交于 2019-12-12 03:47:46
问题 I have installed ArangoDB 3.1 RC3 community edition and created maven project with below code ArangoDB arangoDB = new ArangoDB.Builder().host("127.0.0.1").port(8529).build(); String dbName = "mydb"; try { arangoDB.createDatabase(dbName); System.out.println("Database created: " + dbName); } catch (ArangoDBException e) { System.err.println("Failed to create database: " + dbName + "; " + e.getMessage()); } Here is my pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:/

How to represent days in timeline tree for Neo4j/graphDB

随声附和 提交于 2019-12-12 01:45:46
问题 In reading this blog, this reference, and reviewing the answer to this question, I'm confused as to how one can represent distinct days in a timeline tree. In both cases they show a limited number of days on the example database and my thought is that this model cannot hold if you wanted to model an entire year or an unbounded temporal calendar period. I am reading these examples such that the 'day' nodes are merely just the number of the day '1', '2', .. '31'. As every month has a day

will Gremlin graph queries always perform operations in it's own address space?

我的未来我决定 提交于 2019-12-12 01:29:42
问题 admittedly, most of my database experience is relational. one of the tenets in that space is to avoid moving data over the network. this manifests by using something like: select * from person order by last_name limit 10 which will presumably order and limit within the database engine vs using something like: select * from person and subsequently ordering and taking the top 10 at the client which could have disastrous effects if there are a million person records. so, with Gremlin (from

Constraints for graph models

 ̄綄美尐妖づ 提交于 2019-12-11 17:28:58
问题 I have four possible chains that can be formed with 6 different chain links: G0 -> G1 -> G2 E0 -> E1 -> E2 G0 -> E1 -> G2 E0 -> G1 -> G2 Now I want to express this four chains using a graph model which would look like the following picture: If I use a graph query language to ask eg give me all paths having G0 as first vertex and E2 as last vertex, I would get a path G0 -> E1 -> E2 which is not a valid path or chain out of the four... So my question is is there a possibility to express such

Traverse graph database from random seed nodes

依然范特西╮ 提交于 2019-12-11 16:23:37
问题 I am tasked with writing a query for a front-end application that visualizes a Neptune Graph database. Let us say that the first vertex are items while the second vertex user. A user can create an item. There are item to item relationships to show items derived from another item like in the case of media clips cut out of an original media clip. The first set of items created should be created in a vertex such as a SERVER which they are grouped by in the UI. The following is the requirement:

Service unavailable error using neo4j driver for python

元气小坏坏 提交于 2019-12-11 15:04:03
问题 I am new to neo4j and trying to execute the demo project(Movie search) provided in neo4j website. While doing so I am getting an error to instantiate neo4j server from python. Alternatively, I am able to up and run neo4j server externally and use it. Please find the python code snippet and error details - import os from json import dumps from flask import Flask, g, Response, request from neo4j.v1 import GraphDatabase, basic_auth app = Flask(__name__, static_url_path='/static/') password = os

Neo4J common neighbors of a set nodes in a path

帅比萌擦擦* 提交于 2019-12-11 14:54:17
问题 My network consists of nodes and the relationship is a numeric number. Think of it as a set of cities, and the relationship is the whether there is a road and if so how far is it. I have path from my neo4j query, wonder how I can find the neighbor of this path given the following condition. These neighbors should be neighbor to more than one node in the path. In the following picture, I have tried to illustrate what I mean. My path looks like the blue star below. I would like to find the