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

Document databases are for data you know will be hierarchical and you know you won't have to do much cross referencing on. That's not as broadly useful as it might sound and then once requirements change you end up reimplementing a RDBMS in your NoSQL. I don't hate doc dbs, I just don't think they're as generally useful as they're made out to be.

Relational is well understood. The modeling problem is well understood so you don't have to guess too much about how your data should be structured. By default I start projects with a rdbms and then carve out the portions that truly are hierarchy-only.

That said, I'm starting to investigate graph databases more closely and what I like about them is what I like about relational: queryability. It's so easy to write a short query and extract your data. I like the model quite a bit too because graphs are a pain to shoehorn into a relational db. I'm still not entirely sold but I would love to find more good resources on graph dbs.




But data you store in a relational database is also hierachical...

Order / OrderLine

In a document db we store it as a single document because an order is the root aggregate and the order line cannot exist without an order.

It relates to other objects in the database in the sense that it may relate back to a User...

We hack together our "understood" objects to fit into a relational database.


How much does WITH RECURSIVE help to reduce pain with graphs in PostgreSQL?




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: