graph-databases

Graph or Relational DB specifically recursion

大城市里の小女人 提交于 2020-01-06 15:21:33
问题 I am about to develop a solution for a customer where the basic entity is a member and members can have different multiple social relationships with other members. For instance Lets say we have four types of members Doctors, Specialist, Nurses and Patients. So one or more Doctors can consult one or more Specialists, One or more Doctors can treat one or more Patients. One or more Doctor is in Charge of one or more Nurses. So if I were to use a Relational DB a high degree of recursion would be

titan-1.0.0-hadoop1 compatibilty issues with apache-cassandra-3.2

為{幸葍}努か 提交于 2020-01-06 14:58:37
问题 I am trying to connect titan-1.0.0-hadoop1 with apache-cassandra-3.2 . I am using following " titan-cassandra-myfile.properties ": storage.cassandra-config-dir=titan-1.0.0- hadoop1/conf/cassandra/cassandra.yaml storage.backend=cassandra storage.hostname=localhost When I use gremlin to execute following command: g=TitanFactory.open("/path to titan/ titan-1.0.0-hadoop1/conf/titan-cassandra-myfile.properties"); I am getting following error: java.lang.IllegalArgumentException: Could not

orientdb sql update edge?

被刻印的时光 ゝ 提交于 2020-01-05 19:38:37
问题 I have been messing around with orientdb sql, and I was wondering if there is a way to update an edge of a vertex, together with some data on it. assuming I have the following data: Vertex: Person, Room Edge: Inside (from Person to Room) something like: UPDATE Persons SET phone=000000, out_Inside=( select @rid from Rooms where room_id=5) where person_id=8 obviously, the above does not work. It throws exception: Error: java.lang.ClassCastException: com.orientechnologies.orient.core.id

orientdb sql update edge?

我们两清 提交于 2020-01-05 19:36:43
问题 I have been messing around with orientdb sql, and I was wondering if there is a way to update an edge of a vertex, together with some data on it. assuming I have the following data: Vertex: Person, Room Edge: Inside (from Person to Room) something like: UPDATE Persons SET phone=000000, out_Inside=( select @rid from Rooms where room_id=5) where person_id=8 obviously, the above does not work. It throws exception: Error: java.lang.ClassCastException: com.orientechnologies.orient.core.id

Gremlin on Azure CosmosDB: how to project the related vertices' properties?

雨燕双飞 提交于 2020-01-05 07:30:52
问题 I use Microsoft.Azure.Graphs library to connect to a Cosmos DB instance and query the graph database. I'm trying to optimize my Gremlin queries in order to only select those properties that I only require. However, I don't know how to choose which properties to select from edges and vertices. Let's say we start from this query: gremlin> g.V().hasLabel('user'). project('user', 'edges', 'relatedVertices') .by() .by(bothE().fold()) .by(both().fold()) This will return something along the lines of

Spring Data Neo4j - Argument Type Mismatch

北城余情 提交于 2020-01-04 05:41:13
问题 I used Neo4j 3.0.6, neo4j-ogm 2.0.5, Spring boot starter 1.4.1 RELEASE, Lucene 5.5.2 This is my Machine and machineSectionSummary class (I only post the field, actually there are properties and constructors). When I call updateMachineSectionSummary function, after call this function and relaunch the program, I can't call machineRepository.findByName and get the error below. How can I fix this? I already tried to remove the Date, changing the relationship name, but its not working @NodeEntity

Neo4j/Cypher effective pagination with order by over large sub-graph

故事扮演 提交于 2020-01-03 16:43:33
问题 I have following simple relationship between (:User) nodes. (:User)-[:FOLLOWS {timestamp}]->(:User) If I paginate followers ordered by FOLLOWS.timestamp I'm running into performance problems when someone has millions of followers. MATCH (u:User {Id:{id}})<-[f:FOLLOWS]-(follower) WHERE f.timestamp <= {timestamp} RETURN follower ORDER BY f.timestamp DESC LIMIT 100 What is suggested approach for paginating big sets of data when ordering is required? UPDATE follower timestamp --------------------

Do having multiple labels for a node in Neo4j make any sense?

旧城冷巷雨未停 提交于 2020-01-03 09:44:08
问题 Following this post from Neo4j's google group I have to say that I don't see any benefits when using this multiple-label-thing but rather, on the contrary, IMHO it just adds complexity for what a uniqueness constraint is. It could also tempt the user to introduce inheritance into the data model which would cause frustration since that's not possible at all... 回答1: Labels have not the notion of just representing a type, they are rather roles which are viable in different contexts. So in one

How to use OrientDB ETL to create edges only

天大地大妈咪最大 提交于 2020-01-02 04:01:06
问题 I have two CSV files: First containing ~ 500M records in the following format id,name 10000023432,Tom User 13943423235,Blah Person Second containing ~ 1.5B friend relationships in the following format fromId,toId 10000023432,13943423235 I used OrientDB ETL tool to create vertices from the first CSV file. Now, I just need to create edges to establish friendship connection between them. I have tried multiple configuration of the ETL json file so far, the latest being this one: { "config": {

How to write a select query or server-side function that will generate a neat time-flow graph from many data points?

僤鯓⒐⒋嵵緔 提交于 2020-01-02 02:59:24
问题 NOTE: I am using a graph database (OrientDB to be specific). This gives me the freedom to write a server-side function in javascript or groovy rather than limit myself to SQL for this issue.* NOTE 2: Since this is a graph database, the arrows below are simply describing the flow of data. I do not literally need the arrows to be returned in the query. The arrows represent relationships.* I have data that is represented in a time-flow manner; i.e. EventC occurs after EventB which occurs after