4 ms·
> But you have a DB that everyone knows. 3rd party tools work. Developer on-boarding is easy. Not reliably. All the different DBs have subtle misbehaviours and
by lmm 5y ago
> But you have a DB that everyone knows. 3rd party tools work. Developer on-boarding is easy.
Not reliably. All the different DBs have subtle misbehaviours and mismatches with the tools.
> Performance is actually good and consistent.
Lol no. Indexed joins and unindexed joins look exactly the same but have vastly different performance characteristics. And even if you have a query that currently performs well, you never know when or why the query planner will change its mind.
> Your data is also consistent and respects acid principles.
Only because you drop data on the floor if it's inconsistent, which is rarely a good enough solution in the real world. E.g. someone tries to add a customer but the city has been deleted in the meantime -> they get an error, and the system throws away everything they input about the new customer. You end up having to implement your own dead letter queues etc. and do all the work you would with a NoSQL datastore.
> With proper cashing SQL is as performant when done right and the profiling tools are better.
Caching makes your performance even more arbitrary and incomprehensible - it works great right until it doesn't. Profiling is great but it's a poor substitute for being able to reason about what the performance of your queries will be.
> Screw no-SQL. They are just Object Oriented DBs (which were a disaster in the 90s) in new clothes.
On the contrary - the problems with SQL databases are much the same as the problems with object databases.
- EdwardDiego 5y ago> Only because you drop data on the floor if it's inconsistent, which is rarely a good enough solution in the real world. E.g. someone tries to add a customer but the city has been deleted in the meantime -> they get an error, and the system throws away everything they input about the new customer. You end up having to implement your own dead letter queues etc. and do all the work you would with a NoSQL datastore. What. Who's letting people delete random shit out of the DB? Why is the origin of this data not validating against the actual data from the DB before sending data? "Hey we have to ensure that customers are selecting valid cities. We have a list of cities in the DB. Let's ensure we cache the cities in the api server so that we're not hitting the DB for every page load for data that will very rarely, if ever, change. Especially since we revoked Dave's DELETE permissions after that last time he deleted stuff from a production database."
- lmm 5y ago> Why is the origin of this data not validating against the actual data from the DB before sending data? It's on the client side, so it can't hold an open transaction with the server. It can validate against a previous version of the list of cities, but there's always the possibility of a delete happening in parallel. (And if your answer is to use a delete flag rather than actually deleting a row, then you're undermining the referential integrity constraints that were supposed to be the whole point of using a relational database)
- EdwardDiego 5y ago>It can validate against a previous version of the list of cities, but there's always the possibility of a delete happening in parallel. If a "city" is a) required attribute of an entity and b) required to exist as an entity itself, then deleting a city would require deleting all other entities that refer to that city. If city is a nullable attribute, then your validation issue you raised earlier is voided - an invalid "city" can just be replaced with null. Assuming you're wanting to delete cities, then your client side shouldn't be firing off data and assuming success. > It can validate against a previous version of the list of cities, but there's always the possibility of a delete happening in parallel. Yep, caching is hard, but your argument that "RDBMS aren't that great" is predicated on a very... ...convoluted system.
- lmm 5y ago> If a "city" is a) required attribute of an entity and b) required to exist as an entity itself, then deleting a city would require deleting all other entities that refer to that city. Right, so usually what people implement (and what the database enforces by default) is that you can't delete a city if there are any customers in that city. But they don't think about what happens when two people try to make changes in parallel, because the whole point of ACID is that each query runs in its own transaction. > Yep, caching is hard, but your argument that "RDBMS aren't that great" is predicated on a very... ...convoluted system. All the use cases for referential integrity - and transactionality - are like this though. You can't actually use them for anything, not with a web app where the client can't hold a transaction open.
- marcos100 5y agoIf you're throwing everything the customer have input then you have a poor written application. Not inserting bad data is much better than trying to make sense of inconsistent data because you don't know what is true or not.
- lmm 5y agoValidating consumer input is good. Throwing it on the floor when it fails validation is bad. You want to separate "accept the consumer's input" from "validate it", which is something that's very hard to do in RDBMSes.