Hacker News new | ask | show | jobs
by Blackthorn 4024 days ago
Disclaimer: I'm an idiot and don't make great architectural decisions.

The two main things to think about are simplicity and scale. As for the former, key-value stores from the basic BerkeleyDB (though I think there's more modern and better software now) up to three-dimensional bigtables are really conceptually simple when it comes to your data. It's (mostly) a blob, and it's got a key. Couldn't be easier. Of course, when it comes to using the data, once you want to add new uses it becomes harder because now you have to write actual code in a procedural language and that's usually not very efficient. That's where the power of relational databases comes in. Very very easy there to use the data in a new way you hadn't envisioned easily. It's just a matter of a different SQL query!

Then there's scale. Most people don't really have this problem. Think about the point where you want to stop using sqlite in favor of a separate-process database like Postgresql or MySQL. That's a difficult spot to pinpoint, right? But you have a general idea of where it is. The time where you can't scale postgresql out and start needing a lot of Cassandra or Accumulo servers is a good order of magnitude farther than that. It would really be premature optimization to worry about it before you know it's going to be a problem. Especially since once you cross that bridge, you lose out on scale in a different dimension: querying and using the data becomes tougher!

I haven't really talked about hierarchical schemaless structures like MongoDB because I don't really like them / don't really think they're that useful. Sorry!