ads

Sunday 3 October 2021

New top story on Hacker News: Ask HN: Why are relational DBs are the standard instead of graph-based DBs?

Ask HN: Why are relational DBs are the standard instead of graph-based DBs?
22 by kirillrogovoy | 12 comments on Hacker News.
Hi, I've been recently exposed to some informational systems where all the domain data was modeled as one graph instead of a set of inter-related tables. I worked with RDBs (primarily Postgres) for 5+ years and I cannot say that it ever felt wrong, but the more I think about modeling data as graphs, the more it makes me confused why it's not the default way. Graphs seemed to be: (1) Easier to scale (both storage-wise and complexity-wise). (2) Closer to how we model the world in our minds, hence easier to reason about. (3) Easier to query (felt more like GraphQL than SQL if it makes any sense). The way I see it, there are two major ways to connect singular entities in a data model: 1. Lists (aka tables) that allow you to sort, filter, and aggregate within a set of entities of the same kind. 2. Relations (aka graph edges or foreign keys) to connect singular entities of different kinds. ... And I can imagine relational DBs being List-first Relation-second, and graph DBs being the opposite. But maybe that's too much of a simplification. Anyway, looking back at different domains I worked with, it felt like I had spent much more time working with relations than with lists. Another signal: I have an intern developer, and it took him 1 minute to understand the basics of how graphs work, but then I spent two hours explaining why we needed extra tables for many-to-many relations and how they worked. Any thoughts? What am I missing? Are RDBs the default way mostly due to historical reasons? Discussion on this topic that I could find: https://ift.tt/2TGBWrs

No comments:

Post a Comment