Skip to main content

Questions tagged [graph]

For questions relating to edge and vertex models, storage and processing. For visual representation of data use [chart].

Filter by
Sorted by
Tagged with
1 vote
1 answer
56 views

MongoDB - Finding the degree of separation of two users

As suggested in this post, I'm proposing here my question. I have a MongoDB collections spots which has documents representing the friendship between two users { "_id": "...
Niccolò Caselli's user avatar
8 votes
2 answers
679 views

How can I efficiently traverse graph data with this pattern?

I have some relations embodying a directed acyclic graph that includes patterns similar to the following: I'm looking for an efficient way to traverse this graph data. Here is an example of the ...
alx9r's user avatar
  • 439
0 votes
2 answers
97 views

What is the reason for the graph dbms being better at friend-of-a-friend queries than relational dbms?

I often read that graph dbms are well suited for social networks. So for example, followers on instagram or linkedin. I read that the SQL dbms performance can degrade if the query involves multiple ...
Damiano's user avatar
  • 23
2 votes
0 answers
172 views

DB design for tree structure of user access permissions

I am trying to come up with a good database design for the following problem: We have an application where users can create objects (such as notes) and link those objects to other objects, projects or ...
hg.m's user avatar
  • 21
0 votes
1 answer
86 views

How to evaluate Database benchmarks ? What to consider given a specific example?

I'm trying to figure out which database to use for a project which is supposed to implement a temporal property graph model and I am looking into some benchmarks for that. I found some papers which ...
L.Rex's user avatar
  • 101
0 votes
1 answer
373 views

Shortest paths on huge graphs: Neo4J or OrientDB?

Kia Ora, I have a program that very frequently requires finding the fastest path (both the node sequence and total cost/length) on graphs containing ~50k nodes. Per run, I require on the order of ...
Jordan MacLachlan's user avatar
0 votes
0 answers
106 views

How to turn a complicated graph into Json Graph Format?

So having such normalized Postgres 13/14 graph of item joins: CREATE TABLE items ( item_id serial PRIMARY KEY, title text ); CREATE TABLE joins ( id serial PRIMARY KEY, item_id ...
Blender's user avatar
  • 75
1 vote
0 answers
27 views

What is the appropriate SQL statement/s to produce a stacked bar chart for multiple random variable distributions?

The Objective Graph the difference between the probability distributions of sets of random variables that come from a number of different sources using a stacked bar chart (or another type of graph ...
pilcrowpipe's user avatar
3 votes
1 answer
5k views

Recursively find the path to all leaves descending from a given parent in a tree

I'm trying to write a query to identify the path to each furthest descendant of a particular parent node in a table of tree structures like: 0 1 | | 2 3 | | 4 5 ...
Jason Dreyzehner's user avatar
2 votes
0 answers
483 views

Drop intermediate results of recursive query in Postgres

I'm trying to aggregate the contents of a column from a directed acyclic graph (DAG) stored in a Postgres table. Each dag row has an id, bytes, and may also have a parent referencing another row. I'm ...
Jason Dreyzehner's user avatar
1 vote
0 answers
93 views

SQL Graph DB Tables not supporting OLE DB Fast Load?

I try to use SSIS to load in SQL Server Graph DB an edge table, based on the documentation from MSFT it should behave like any normal table, if I use the OLE DB Destination with regular table load it ...
nojetlag's user avatar
  • 2,907
1 vote
0 answers
80 views

Copying a dependency structure

I'm looking for performing a copy of a "dependency structure". What I mean is: there is a tree structure representing a product and its sub components. Each of this products may have one or ...
Eug_Zazou's user avatar
9 votes
1 answer
682 views

Find friends of friends (recursively) efficiently using Postgresql

Objective: Users submit their Contact Books, and then the application looks for connections between users, according to their Phone Number. Something like "6 Handshakes" idea (https://en....
Viktor Vsk's user avatar
1 vote
1 answer
407 views

Does Hasura (GraphQL) support multiple databases? [closed]

Hi I am setting up Hasura, the normal setup looks like this: docker run -d --net=host \ -e HASURA_GRAPHQL_DATABASE_URL=postgres://username:password@hostname:port/dbname \ -e ...
Ander's user avatar
  • 113
1 vote
1 answer
494 views

Postgresql 11 - Storing billions of relationships in normalized table paritions or intarray[] column

Some pre information Postgresql Version 11.2 GCE CPU: 6cores SSD: 250gig RAM: 64gigs We are currently deciding on how to store massive amounts (in the billions) of links/relationships between items ...
Dan W's user avatar
  • 63
1 vote
1 answer
473 views

Hierarchical data with versioning

I have a domain where I deal with data which has a parent/child relationship, of arbitrary depth. Also, full time traversal needs to be enabled, to show the state of the data at a specific point in ...
moi2877's user avatar
  • 19
7 votes
1 answer
364 views

Do any of the graph based/aware databases have good mechanisms for maintaining referential integrity?

Do any of the graph-based/graph-aware databases (Neo4j, ArangoDB, OrientDB, or other) have mechanisms for maintaining referential integrity on a par with those offered by relational databases? I'm ...
pvgoran's user avatar
  • 171
1 vote
1 answer
37 views

Can I use only OrientDB without any RDBMS?

I'm struggling with this problem and I really need an advice. My project mainly needs a Social structure, users can be connected with some friendship relations, can create groups and so on. In this ...
Philip's user avatar
  • 111
12 votes
1 answer
801 views

SQL Server 2019: Memory performance with graph queries (possible memory leak)

I'm currently working on implementing an upgrade to SQL Server 2019 in order to make use of the graph features that are available in it. Our database stores records of files and their children, and ...
Alan Deutscher's user avatar
2 votes
1 answer
421 views

How to maintain order when modeling outline in graph database?

(TaskPaper) outlines have a natural hierarchy relationship, so a graph database seems like a great fit. Each item in the outline is a node of the graph that points to its parent and children. I also ...
Leftium's user avatar
  • 769
1 vote
1 answer
93 views

When is running a graph database like OrientDB in cluster mode required?

OrientDB can run in a distributed environment, supports ACID transactions and peer to peer replicaiton. According to the book "NoSQL Distilled: A Brief Guide to the Emerging World of Polyglot ...
Darkov's user avatar
  • 113
-1 votes
2 answers
436 views

Graph Database - data modelling - linking multiple pairs of nodes using the same edge?

I am trying understand the concepts, which apply to data modeling using Graphs - specifically on SQL Server 2019. One thing I am unsure of is can the same edge be used to connect different pairs of ...
Soap's user avatar
  • 11
2 votes
1 answer
3k views

Constraint on multiple columns?

I have a table edges, which describes relations in a graph: CREATE TABLE IF NOT EXISTS edges ( src INT NOT NULL REFERENCES nodes(id) ON UPDATE CASCADE ON DELETE CASCADE ,tgt INT NOT NULL ...
Victoria Stuart's user avatar
0 votes
0 answers
979 views

What can Neo4j do that ArangoDB can't?

I'm in the process of choosing a database for a project related to biology and medicine. The main added value of a graph database will be the ability to explore and weight the relationship between ...
Xiiryo's user avatar
  • 101
1 vote
1 answer
156 views

Neo4j import performance [closed]

I have a Neo4j 3.5.3 installation on my Ubuntu laptop (which is Intel i5, 4 GB RAM, SSD disk) and I'm trying to import a moderate-sized dataset from CSV files into the graph. Here is the full Cypher ...
filiprem's user avatar
  • 6,669
0 votes
1 answer
745 views

Why are graph databases bad at CRUD operations?

I heard that graph DBs are inherently worse at CRUD operations than relational DBs. Is this true? If yes, why is that? Some thoughts: To do a crud operation in a realtional DB you basically have ...
User12547645's user avatar
1 vote
1 answer
395 views

Storing Routes and Locations in Graph using SQL Server 2017

I'm very new to Graph database, so please ignore my mistakes. My scenario described in following picture: I have different locations connected to each other with a route between them. Then I have ...
صفي's user avatar
  • 111
4 votes
1 answer
305 views

How do graph databases differ from older navigational (hierarchical/network) databases?

I'm trying to improve my knowledge of graph databases, in particular DGraph. Are graph DBMSs just a new generation of pre-relational hierarchical/network model DBMSs, or is there something new at a ...
webstackdev's user avatar
2 votes
2 answers
214 views

How to group items by path (graph structure) and leave only those with highest score using t-sql?

I have a table with records and their scores (table 'Offers'): OfferId OfferScore ----------- ----------- 1 1 2 20 3 3 4 4 5 5 6 6 7 ...
free4ride's user avatar
  • 147
1 vote
0 answers
409 views

Connecting Apollo Server to OrientDB Graph Database -- How to Connect?

I'm attempting to create a web application that will rely on fetching data from a Graph Database. My graph database is hosted by OrientDB 3.0. I'm trying to set up Apollo Server on the same machine to ...
Rudy's user avatar
  • 111
1 vote
1 answer
348 views

Design for graph polymorphism

I have a graph database with multiple edge types. For example create table Person(Name varchar(50)) as node; create table Friend as edge; create table Manager as edge; insert Person(Name) values ('...
Michael Green's user avatar
2 votes
0 answers
401 views

How to represent recursive relationships in a graph database?

I am designing a database schema diagram for a Neo4j database. This is what I have so far: This is the cypher code: CREATE (`0` :Person {FirstName:'string',LastName:'string',DOB:'long'}) , (`1` ...
JavascriptLoser's user avatar
4 votes
1 answer
2k views

How Graph Databases Store Data on Disk

I have seen these papers: TurboGraph GraphChi BiShard Parallel Processor G-Store NXgraph GridGraph ...and a few others. I am new to databases (other than having used them for web apps without ...
Lance Pollard's user avatar
0 votes
2 answers
146 views

How to create a graph connecting predecessors and successors in time from a timeseries table in PostgreSQL 10?

I have the following table: ╔════╦═══════════╦═════════════════════╦═══════╗ ║ id ║ sensor_id ║ time ║ value ║ ╠════╬═══════════╬═════════════════════╬═══════╣ ║ 1 ║ 1 ║ 2018-...
Tiago Stapenhorst's user avatar
0 votes
1 answer
690 views

cypher query to find Employee nodes who have all the Skills

I'm trying to write a cypher query to find the first name of 'Employee' nodes who 'Has' all the Skills (have relationship with all the nodes with the 'Skill' label). This is my data model: I managed ...
user avatar
1 vote
0 answers
942 views

Implementing a graph-like design on postgresql using CTEs and inheritance

This question is about attempting to model/design an elementary graph-like database within postgres. The starting point is that graphs have: Nodes Nodes have properties Node are connected by (bi/...
ahron's user avatar
  • 813
1 vote
0 answers
38 views

How can I detach a specific relationship to a node then "move" it to another node in a graph database?

I'm trying to make a game using the neo4j graph database as an experiment. Some nodes are Users and some nodes are Rooms. Rooms have a CONTAINS relationship to Users so the database has a lot of this: ...
Austin Capobianco's user avatar
0 votes
1 answer
373 views

How to design a graph database in this scenario?

here is my scenario. I have a pre-defined data type structure for books. Just take it as an example for the sake of simplicity. The structure looks like the image below. It's a Labeled Property Graph ...
Triet Doan's user avatar
5 votes
2 answers
8k views

Neo4J community edition DB size limit?

The Neo4J site states that the community version of Neo4J has a limit in the graph size, but does not state the limit of the community version. https://neo4j.com/editions/ What is the size limit of ...
adamM's user avatar
  • 151
10 votes
1 answer
2k views

Is There a Single-File Based Graph Database Management System?

I am considering using a graph database management system (DBMS for brevity) as an application file format for my single-user desktop application. Is there a single-file based graph DBMS (the "...
dangerousdave's user avatar
0 votes
1 answer
1k views

What is an efficient storage method to store Graph Data from GraphX (Spark)?

I generate graph data using Spark's GraphX library and I need an efficient way to store graph data. I have access to Apache Cassandra and ideally I want to store the graph data in there but the issue ...
Mnemosyne's user avatar
  • 101
2 votes
1 answer
712 views

Can every SPARQL query be expressed as a GraphQL query?

The question is really formulated in the title :-) I am working on an RDF project but I want to make it as easy as possible to interact with the API. Therefor GraphQL seems the most likely. UPDATE: ...
Bob van Luijt's user avatar
4 votes
1 answer
299 views

Which allows for faster queries in a graph database: a node with multiple properties, or a node that points to multiple nodes?

I just started using Neo4j and I don't know when it'd be best to add properties to a node vs when to create more nodes. I'd assume for simple things like x and y coordinate data, it's better to use ...
Austin Capobianco's user avatar
1 vote
0 answers
21 views

Database for querying a probabilistic automaton

I've got a probabilistic automaton of 4000 states, with 20 attributes attached to them, and 60 000 transitions between the states. I would like to, given a defined sequence of states, find all valid ...
Perry's user avatar
  • 111
1 vote
1 answer
159 views

Which database type for log analysis?

I am running a database for log analysis. At the moment I use a MySQL database and the table for my analysis looks like this: UUID REQUEST_ID REQUEST_TIMESTAMP RESPONSE_TIMESTAMP RUNTIME SERVER_NAME ...
LStrike's user avatar
  • 149
0 votes
2 answers
4k views

Proper way to store lots of links?

I'm doing a small crawl over multiple sites and I have a lot of links which are represented by ID's (example.com/foo = 354). I'm currently storing the link -> link references and the link text. So ...
Xeoncross's user avatar
  • 109
7 votes
3 answers
867 views

Collect all Similar Persons to One Group

I have a person with several Id's. Some of them in Column Id1 and Some of them in Id2. I want to collect all the same persons Id's to one group. If id1=10, is in the same row with id2=20. so it's ...
Dima Ha's user avatar
  • 73
4 votes
1 answer
702 views

What can be represented in a relational database that can't be represented in a graph database?

I read Blockeel's article that is comparing different paradigms how to represent data. He mentions following advantages of the relational paradigm in comparison to graph paradigm: They can naturally ...
user824276's user avatar
0 votes
2 answers
570 views

Using PostGIS to compute graph data

I have a query which return me two dimension data: SELECT POINT(value , extract(EPOCH FROM datetime)) AS pseudo_geom FROM table gaves me pseudo_geom --------------- (18,1439679940) (29,1439680000) (...
AnomalySmith's user avatar
1 vote
0 answers
106 views

Type of relational/object-oriented database with improved joins for object graphs?

I would like to know if there is a specific name or term for the kind of database described below: I notice one of the biggest problems when working with relational databases and object trees/graphs ...
Erik Hart's user avatar
  • 510