graph-databases

How to store social network's actions in NEO4J?

喜夏-厌秋 提交于 2020-02-06 05:06:26
问题 We are going to use NEO4J for our social network database and we have common social networks actions such as following, link, comment, posts and so on... . Now I want to know is this correct, we are doing: Comment: user_comment is a node and has a relation with post node, relation name is comment Like: Like is a relation, the relation name is like and a post has a relation with a user, the relation name is like Location: Each post can have a location, then post node has a where relation with

How can I query an edge property by value?

扶醉桌前 提交于 2020-01-15 15:30:37
问题 I'm using OrientDB (Community-2.0.9) and have two vertices: Person and University and one edge: isStudent. The edge isStudent has the property 'mark' as float. Person --isStudent--> University. Now I want to select all persons, where the mark is greater than 3.0, but I got no results, but if I query for equality I got two results. Do you have any ideas how to solve this? Queries: SELECT FROM PERSON WHERE out_isStudent.mark = 3.4 --> two results SELECT FROM PERSON WHERE out_isStudent.mark > 3

How do I get the already existing constraints in Neo4j?

回眸只為那壹抹淺笑 提交于 2020-01-14 04:09:50
问题 When I've created some constraints on the graph, how is possible to see them and in case eliminate them? What is the syntax to treat them as elements of the graph? 回答1: In the neo4j browser you can use the :schema command to list them. In shell it is schema Then you can remove them with `DROP INDEX ON :Label(prop)` or `DROP CONSTRAINT ON (n:Label) ASSERT n.props IS UNIQUE` 回答2: In Browser you can use CALL db.constraints to get all constraints on graph. For more Info: https://neo4j.com/docs

Neo4J - Storing into relationship vs nodes

拥有回忆 提交于 2020-01-13 11:23:09
问题 I was wondering if there are any advantages or disadvantages in storing data into relationships or nodes. For example, if I were to store comments related to a discussion into the DB, should I store the comment data in a "comment" relationship or a "comment" node that is related to the discussion through a separate relationship. 回答1: The correct data model depends on the types of queries you need to make. You should figure out what your queries are, and then determine a data model that meets

Neo4J - Storing into relationship vs nodes

自闭症网瘾萝莉.ら 提交于 2020-01-13 11:22:56
问题 I was wondering if there are any advantages or disadvantages in storing data into relationships or nodes. For example, if I were to store comments related to a discussion into the DB, should I store the comment data in a "comment" relationship or a "comment" node that is related to the discussion through a separate relationship. 回答1: The correct data model depends on the types of queries you need to make. You should figure out what your queries are, and then determine a data model that meets

Neo4J - Storing into relationship vs nodes

只愿长相守 提交于 2020-01-13 11:22:52
问题 I was wondering if there are any advantages or disadvantages in storing data into relationships or nodes. For example, if I were to store comments related to a discussion into the DB, should I store the comment data in a "comment" relationship or a "comment" node that is related to the discussion through a separate relationship. 回答1: The correct data model depends on the types of queries you need to make. You should figure out what your queries are, and then determine a data model that meets

Is it possible to work with OrientDB using C#?

不问归期 提交于 2020-01-12 07:15:28
问题 Are there any implementations, api or examples of OrientDB and C#. The reason I am looking at OrientDB is becuase it's the only one that I found that is a combination of Graph and Document. Any suggestions on how I should try this. My next choice is RavenDB, but I am not sure if it supports joins or linked documents? Any thoughts... 回答1: I just developed a first version of a REST client for OrientDB. http://netorientdb.codeplex.com 回答2: OrientDB has an official binary driver for .NET look

How to load millions of vertices from CSV into Titan 1.0.0 using Bulkloadervertextprogram?

孤街浪徒 提交于 2020-01-11 11:53:51
问题 I am trying to load millions of nodes from CSV files to Titan 1.0.0 with Cassandra backend in JAVA. How to load them? I checked we can load them using BulkLoaderVertexProgram, but it loads the data from GraphSON format. How do I start writing a JAVA code to bulk load the data from CSV ? Can you specify some starting reference where I can look into and start writing code? Do I have to have Spark /Hadoop running on my system to use SparkComputerGraph which is used by Bulkloaderprogram? I am not

Orientdb performance issue on multi-threaded system

♀尐吖头ヾ 提交于 2020-01-07 03:09:28
问题 When you go through OrientDb website, they give some fancy statistics about number of document than can be created per second . I am not in need of any these fancy speed, a moderate will work for my use case. My use case : My system is multi-threaded On per request I am receiving Db-Name Current_Vertex_Name Previous_Vertex_Name Then execute the below pseudo code :- I did tried my use-case with the below pseudo code but I found speed very slow. Pseudo code of my use case is following below:-

How to execute gremlin query with mogwai

橙三吉。 提交于 2020-01-06 19:58:48
问题 Im trying to query a titan db 0.5.4 via mogwai, but when I run the following script i get the error: rexpro.exceptions.RexProScriptException: transaction is not open and I found the same question here P.S there is no tag for mogwai script: #!/usr/bin/env python3 from mogwai.connection import execute_query, setup con = setup('127.0.0.1', graph_name="bio4j", username="re", password="re") results = execute_query("2 * a",params={"a":2}, connection= con) print(results) results = execute_query(