Ask HN: If you've used a graph database, would you use it again?
I used Neo4j for a few side projects but my go-to is still PostgreSQL. The largest flaw I see with Neo4j (and probably other graph databases as well) is that it forces you to think of your entities as either vertices or edges and that line tends to be not as clear as you might expect.For example: (:Person)-[:BEFRIENDS]->(:Person)If we'd want to store a date with that relationship, Neo4j got your back, that's entirely possible (= relationships can have attributes). But now our requirements change and we'd also want to have an entity for Events shared by friends (e.g. friendship anniversary), now we have to remodel our data to something like:(:Person)-[:IS_IN]->(:Friendship)-[:HAS]->(:Event)In SQL that wouldn't have been a remodel, because there's no difference between a relationship and an entity. We would've gone from:Person(id)
Friendship(person1_id, person2_id)to:Person(id)
Friendship(person1_id, person2_id)
Event(friendship_id)So I feel like the vertice/edge distinction Neo4j makes, gets in the way of changing data model needs and I ultimately think that modeling your data as a graph is not helpful. Though it can be extremely helpful in querying and that's where its biggest strength lies.