Hacker News new | past | comments | ask | show | jobs | submit login

This would be easy in a graph db. Just move the node and its children come along for the ride.



Not exactly. If you look a bit closer, you'll see that this isn't just a strict child, otherwise they might have managed by swapping a foreign key or something. In a graph db, you'd still have to reconnect dangling edges that no longer make sense, like for comments and users. Also, the transaction rollback issue. Which is to say: tanstaafl.


Doesn't need to be a strict child when using a graph (not to confuse with hierarchical) database. Not sure what you mean by dangling edges, at least the Neo4j graphdb guarantees that edges are always connected at both ends. It's also ACID compliant so rollbacks are supported. Sure, tanstaafl, but when dealing with data in a graph structure there's much better tools than RDBMS nowadays!


The comments and user nodes are moved with the parent. It's like moving a folder with subfolders in the filesystem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: