graph-databases

Can we use the output of one recursive query into another recursive query?

元气小坏坏 提交于 2019-12-23 05:29:05
问题 I wanted to find the topological sort of a DAG. create table topo( v1 int, v2 int ); Insert into topo values (1,3),(2,5),(3,4),(4,5),(4,6),(5,7),(6,5),(7,null) WITH RECURSIVE path(S,d) AS( select t1.v1, 0 from topo t1 left outer join topo as t2 on t1.v1=t2.v2 where t2.v2 IS null UNION ALL select distinct t1.v2, path.d + 1 from path inner join topo as t1 on t1.v1=path.S ) select S from path group by S order by MAX(d); This code gives the output of the topological order of a graph. Now i want

How to write a Cypher query with a condition on one of relationship properties in Neo4j database?

眉间皱痕 提交于 2019-12-23 05:26:37
问题 My question: I am new to Neo4j and trying to create a query listing nodes and relationships into a graph with keyword as "id=0001" as below: (a) - [id:'0001', ref_id:null] -> (b) - [id:'0002', ref_id:'0001'] -> (c) - [id:'0003', ref_id:'0002'] -> (d) Start Node will be (a) since it has relationship with id=0001 But the database also exists relationships which I don't want: (a) - [id:'2001', ref_id:null] -> (b) - [id:'2002', ref_id:'2001'] -> (c) (a) - [id:'3001', ref_id:null] -> (b) - [id:

How to stop Neo4j community edition

爱⌒轻易说出口 提交于 2019-12-23 05:21:48
问题 I have installed both Neo4j Community edition and enterprise edition. The problem is that I can not connect to community edition despite assigning different port on Neo4j.conf and another problem is that when I go to the Community edition directory and write :Net stop neo4j , The enterprise edition goes down!!! I'm stopping community edition but the enterprise edition stops !!! What's wrong ?? 回答1: It's a problem linked to Windows service. You have installed Neo4j Enterprise as a service with

Updating the entire value of vertex property with List cardinality in Titan graph database

点点圈 提交于 2019-12-23 03:41:27
问题 I am going to update entire value of list property and set a new value for that in Titan 1.0, for single cardinality I can use vertex.property("single_property",new_value) ,and overwrite the whole value but for the cardinality of type List, the new value will be added to the property (it will not overwrite the whole value). Moreover, if I remove the property and add a new value, in the same transaction it seems that the whole operation will be ignored by Titan! Therefore, my question would be

Unable to switch neo4j database

冷暖自知 提交于 2019-12-23 01:54:35
问题 I am new in neo4j and i am using " neo4j-community-3.0.1 " . I want to switch database and retrieve nodes .After google i found how to switch database . But there is no file with name conf/neo4j-server.properties There are two files neo4j.conf and neo4j-wrapper.conf . But there is not any configuration such org.neo4j.server.database.location=data/graph.db Can any one help me how to switch database and i am able to see node using browser 回答1: As of Neo4J 3.0, all the configuration files have

Time/date based searches in neo4j

99封情书 提交于 2019-12-23 01:27:09
问题 while playing around with neo4j a couple of questions arisen. At present time there are 2 of them: How can I limit the relationships/edges while searching for a specific path from node X to node Y (RegEx?/Wildcard?)? For instance all edges have 2 time attributes, "begin" and "end". I would like to find a path between nodes which occured between 2 am and 3 am in the morning.? How can track a time path? Lets say a car drove from 'A' to 'B'. The route took one hour, namely from 5 am to 6 am. The

Neo4j can I make relations between relations?

对着背影说爱祢 提交于 2019-12-22 13:34:25
问题 I'am using graph database (Neo4j) , and I need to make relations between relations , for example : (user1)-[:FOLLOWED]->(user2) I want to allow other users to like this activity (that user1 followed user2) , what's the best implementation for this ? 回答1: Short answer: You can't create a relation to a relation. How to do? You have to create an activity node in the middle of your relation: (user1)-[:FOLLOWED]->(activity{date:..., blabla:...})-[:ACTIVITY_FOR]->(user2) Then you'll be able to make

How to model a relational database into a neo4j graph database?

南楼画角 提交于 2019-12-22 07:10:09
问题 I have a relational database (about 30 tables) and I would like to transpose it in a neo4j graph database, and I don't know where to start... Is there a general way to transpose tables and/or tuples into a graph model ? (relations properties, one or more graphs ?) What are the best sources of documentation ? Thanks for any help, Best regards 回答1: First, if at all possible, I'd suggest NOT using your relational DB as your "reference" for transposing to a graph model. All too often, mistakes

Is there a database like this?

只谈情不闲聊 提交于 2019-12-22 01:44:59
问题 Background: Okay, so I'm looking for what I guess is an object database. However, the (admittedly few) object databases that I've looked at have been simple persistence layers, and not full-blown DBMSs. I don't know if what I'm looking for is even considered an object database, so really any help in pointing me in the right direction would be very appreciated. I don't want to give you two pages describing what I'm looking for so I'll use an example to illustrate my point. Let's say I have a

Neo4J database size / shrinking

倖福魔咒の 提交于 2019-12-21 17:19:42
问题 We have a neo4j database with ~10Mil nodes and ~300 million relationships. the database has grown to about 80 Gig. There are daily jobs that kill off old data and add new data, so the approx number of nodes and relationships stays fairly constant. However, the physical file size of the db files keeps on growing (for example, the relationshipstore file is at 50Gig currently). I have found the following link that might explain why the size might not go down when deleting (space is left reserved