57 ms·
> That said, it's pretty hard to make sense of when you would want non-relational dbms these days. Write-scaling is still a pretty obvious reason, though things
by growse 9y ago
> That said, it's pretty hard to make sense of when you would want non-relational dbms these days. Write-scaling is still a pretty obvious reason, though things like Citus might help here.
Personally, I find a non-relational database useful when my data model is non-relational.
- bpicolo 9y agoSure. The most direct argument against that is that Postgresql jsonb is just non-relational data support in a first class relational DB, which is pretty great, so to an extend you get the best of both worlds, though I'm sure you can find a case where it's not quite optimal vs some nosql db. This talk is a pretty nifty perf overview: https://www.percona.com/live/e17/sessions/high-performance-json-postgresql-vs-mongodb https://www.percona.com/live/e17/sessions/high-performance-j... That said, if you know beforehand that horizontal scaling will be a crucial factor, probably postgres isn't the first choice. But with how fast CPUs are these days it's usually not important for a long time.
- jsjohnst 9y ago> But with how fast CPUs are these days it's usually not important for a long time. That’s a very naive statement to make.
- bpicolo 9y agoIs it? Because there are a ton of companies out there running postgres, mysql and scaling workloads just fine.
- jsjohnst 9y agoI upvoted you because you’re technically right for many cases, but if you’d ever dealt with a database you couldn’t scale further (we were using multiple of the largest instances EC2 had at the time) and new data was flowing in faster than you could delete it and downtime wasn’t an option, you too would hate any predecessors who said “you can always scale higher” before things got so bad it was almost impossible to recover.
- bpicolo 9y agoYeah. There are definitely cases where the scaling options make sense along different axis for sure. My point is mostly that relational DBs tend to strike a good default ground if you aren't sure what axis you'll care about.
- takeda 9y agoIf you grow and you hit hardware limits then congratulations you are the next facebook/google/etc. Also there's nothing stopping you from switching your current database to something else. Absolutely majority of the companies will do just fine, because the hardware improves faster than their demands. Starting out with a distributed system "because one day we might need it" is just silly, because chances are you'll never hit it, and you'll have to pay for the overhead of having a distributed system (which is non trivial). Actually my company started using PG and had presentation and someone asked if we considered a distributed database so we can scale. The presenter nicely said it was evaluated and this solution worked best, but that was too nice. 1. It's only about 100GB of data 2. The hardware is barely utilized, we didn't tune it (except some standard memory settings), because there's no need yet. 3. Our data is relational (in fact most data from most companies is relational)
- threeseed 9y agoPostgreSQL JSONB doesn't have a dedicated driver though i.e. you can't do partial updates via the JDBC/ODBC drivers. Which means you can't use it for any big data/analytics use cases. MongoDB has fantastic client libraries e.g. Spark, Java.
- collyw 9y agoThat makes complete sense, but it seems to be very rare that data is non relational in my experience.
- hungerstrike 9y agoWhat is an example of non-relational data? A tree is relational. Each child has a relation to its parent. I can't imagine data that has no relation (no connection) to anything else. Maybe what you meant was heterogeneous (e.g. data elements that do not all have the same attributes) - but even then I can't readily come up with an example.
- balfirevic 9y agoWord "relational" in relational databases does not stand for relationships between the tables [0]. That being said, relational model is a great fit for plenty (most?) of the data. [0] - https://en.wikipedia.org/wiki/Relation_(database) https://en.wikipedia.org/wiki/Relation_(database)
- hungerstrike 9y agoThanks for the technical correction. That also being said, I think that definition is terrible and that anybody trying to understand what a relational database is would be better off not reading that article. Yes, I agree that most types of data can be stored in tabular form (or an "n-ary relation" per Wikipedia). I'm just wondering what concrete types of data one would rather store in a document. I don't think there is a good example. The decision to store some data outside of an RDBMS must have more to do with the processing model or something else.
- growse 9y ago> I don't think there is a good example. The decision to store some data outside of an RDBMS must have more to do with the processing model or something else. What else other than the processing model and business requirements would determine how you model and store your data?
- hungerstrike 9y agoThat was my point. The person I responded to said that they only store "non-relational data" in NoSQL so I was asking what that was.