Live data from Hacker News

Ask HN: If you've used a graph database, would you use it again?

news.ycombinator.com

21–30 of 84 posts

Re: Ask HN: If you've used a graph database, would you use it again?

#21

I've been using RDF and triplestores / RDF databases for the last half-decade, developing both front-end and back-end systems, and training many developers to work in RDF. If you're used to either relational databases or object-oriented design, it's a really different way of thinking about data. Just like OOP is really good for certain kinds of problems and models, and RDBMS is good for other kinds of problems and mo…

This is interesting, I always wanted to find a good use case for RDF but in the end RDBMS worked out fine.

Sports events seem a good example. What made it easier for you in your example of basketball play-by-plays with RDF?

Taking the first example https://github.com/andrewstellman/pbprdf#example-analyze-a-s... and translating it into an RDBMS approach seems rather straight forward:

  GameEvent (PersonA, EventType, PersonB, Game, Time)
  Roster (Person, Game, Team)
To get the fouls drawn you then take

  SELECT Team, COUNT(Team)
  FROM GameEvent
  JOIN Roster ON GameEvent.Game = Roster.Game AND GameEvent.PersonB = Roster.Person
  WHERE GameEvent.EventType = "foul"
  GROUP BY Roster.Team
Is it because of easier schema changes later on like introducing "secondsLeftInPeriod"? I suppose in a normalized relational scenario that could be something like:

  Period (Number, Game, StartTime, EndTime)
And doing

  .. WHERE Period.EndTime - GameEvent.Time 

Re: Ask HN: If you've used a graph database, would you use it again?

#22
post #18
post #3

Interesting question. I think it is critical to point out that, the underlying principles for a graph database is different from RDBMS, because the operators in a graph database may not comply to relational algebra. Consider the following case: Client A issues a query -- starting from a vertex, conduct bounded closure search, giving every visited vertex a mark (coloring, or lexical flag, whatever you would expect fro…

Transaction isolation is a no-brainer, so I don't think your example holds. Also, your example is not related to the algebra but to isolation. "Claiming ACID" what is ambiguous about that? Transaction support with different serialization levels, like other databases that offer it. And Neo4j originally started b/c RDBMS was not able to execute the complex deep traversals needed in real time. Dedicated storage & query…

> "Claiming ACID" what is ambiguous about that? Transaction support with different serialization levels, like other databases that offer it.

A non-graph-database would not provide operators like deep traversals. Operations are tightly bound to ACID as a whole, not just isolation. Of course ACID would always hold if you strictly linearize everything, but that defeats the purpose of data management, and one would achieve the same goal with even macro processors like `m4`.

Getting traversals and other graph algorithms into the business means that there are lot of things that should be reconsidered, like constraints, and triggers.

For example, if you cannot write a constraint to limit the local clustering coefficient of every entity, you do not proceed in your traversal with a good upper bound time budget. However, it is the vertices that you _don't_ visit that will propagate these constraints back while you are halfway there. Parallelizing such queries, in my opinion, is beyond state-of-the-art research.

Re: Ask HN: If you've used a graph database, would you use it again?

#23
post #4

The coolest thing to me about neo4j is that it spins up a little web server with an extremely friendly UI that allows people to build queries and run then locally. My non-coder coworker wrote all her own queries and found, then fixed errors in the data entirely on her own. Our data set could have been handled fine with a relational database, honestly. However this was a rare case where over-engineering a problem and…

So I used Neo4j in 2011. It was very exciting at first, and then I got quite burned by it when I tried to make something real. Many people in this thread are describing a very different experience, and I want to know if it has really dramatically improved, or if the use cases of Neo4j users are just different from mine.

- In 2011, it worked great on small data that fit in RAM, but once the data became bigger than RAM, queries would take unexpectedly large numbers of seconds. How much data do you put into Neo4j?

- I admired the friendly little web server until I realized that it was a massive security hole: anyone who could access it could run arbitrary code on the server, it ran over plain HTTP, and if you put it behind an HTTPS proxy, it stopped working. I hope this isn't still the case. Does it have reasonable access control and HTTPS now? Could you use the Web interface in production?

Re: Ask HN: If you've used a graph database, would you use it again?

#24
post #3

Interesting question. I think it is critical to point out that, the underlying principles for a graph database is different from RDBMS, because the operators in a graph database may not comply to relational algebra. Consider the following case: Client A issues a query -- starting from a vertex, conduct bounded closure search, giving every visited vertex a mark (coloring, or lexical flag, whatever you would expect fro…

ACID is whatever you define. In a RDBMS you can make a query returning dirty data, or that data is partially saved if an error happens. Or you can roll it into a full ACID compliant query/transaction. I think that in a graph database, the ACID property comes at a greater cost, but to me it's a tool I use as a secondary store, derived from the "truth" in the RDBMS. I use it to store the data more efficiently for queri…

this is a primary scenario for us -- knowledge graph streaming into the system, and graph queries run with private working sets, without touching the core data.

Re: Ask HN: If you've used a graph database, would you use it again?

#25
We use Titan DB and are updating it to Janus since Titan is dead. We used Neo4j for a small hack at an event at the office mapping up bus routes and homes living along the bus stops to find out quickly how accessible they were, and it worked well ... for a hack.

I really like Gremlin and I like how you can extend the relations and do new computations you never thought of easily, but it's not the savior it's been hailed as, in my opinion. For a lot of problems SQL will do you well, and migrating can be a bitch with SQL but if it's a domain where the basic functionality is solved (such as a web shop) I wouldn't bother with a graph database until i find a good use case for it. You can always migrate your SQL tables to a graph DB later on if you think it's worth it.

Re: Ask HN: If you've used a graph database, would you use it again?

#26
post #6

Facebook uses a custom graph database called TAO (nodes, edges, traverse them [1]) for storing (almost) all production data. Based on DBMS classes from the Uni days this is counterintuitive, but . In practice it just worked, and it didn't keep / enabled SWEs to move fast. Having said that I don't see why I would use a graph database unless I have >10M DAUs. [1] https://www.facebook.com/notes/facebook-engineering/tao-…

Does that mean Daily Active Users? Please spell out abbreviations!

Re: Ask HN: If you've used a graph database, would you use it again?

#28
post #6

Facebook uses a custom graph database called TAO (nodes, edges, traverse them [1]) for storing (almost) all production data. Based on DBMS classes from the Uni days this is counterintuitive, but . In practice it just worked, and it didn't keep / enabled SWEs to move fast. Having said that I don't see why I would use a graph database unless I have >10M DAUs. [1] https://www.facebook.com/notes/facebook-engineering/tao-…

Does that mean Daily Active Users? Please spell out abbreviations!

TAO = The Associations and Objects (from the linked paper)

SWE = Software engineer

DBMS = Database management system

DAU = Daily active users

Re: Ask HN: If you've used a graph database, would you use it again?

#29

I've been using RDF and triplestores / RDF databases for the last half-decade, developing both front-end and back-end systems, and training many developers to work in RDF. If you're used to either relational databases or object-oriented design, it's a really different way of thinking about data. Just like OOP is really good for certain kinds of problems and models, and RDBMS is good for other kinds of problems and mo…

Do you know if there's off-the-shelf software (GUI) to create/edit/explore your own RDF dataset? Or does it always involve building your own front-end?
Post reply on HN