3 ms·
All roads lead back to RDBMS, it's amazing how this piece of theory just works.
by eddiewithzato 3y ago
All roads lead back to RDBMS, it's amazing how this piece of theory just works.
- giantg2 3y agoI'm coming to this conclusion as well. Something like DynamoDB can be great for simple data. I liked the idea of Graphql (technically the API query and not the database). Both of them turn into hot garbage once you get into complex data, especially if it's being aggregated from multiple sources. Or maybe the systems I work with just implemented them poorly.
- SkyMarshal 3y ago> this piece of theory Key words right there. The relational model is a timeless mathematical model for data that gains both logical consistency and adaptability as a result. It has and will continue to stand the test of time.
- quickthrower2 3y agoAnd in practice it has a superpower: agility. The pointy haired boss wants your OLTP to be an OLAP, and you can kind of hack it. You want to put the user's birthday on the settings page this quarter? Sure. Even if that is in another table. You can even make it efficient.
- whaleofatw2022 3y agoI mean FFS I can get a process to write more rows/sec to AuroraPG than Dynamo with needed semantics, with less code and lower IOP cost
- randomdata 3y agoIn my experience, the roads lead back to SQL. It deviates from the relational model. It may even be that SQL was successful because it deviated from the relational model. Perhaps the theory doesn't just work?
- int_19h 3y agoRoads lead back to SQL because it became a de facto industry standard for "relation-like" stuff. Can you give an example of a query that cannot be expressed well in relational algebra, but can be in SQL because it deviates from that?
- randomdata 3y ago> Roads lead back to SQL because it became a de facto industry standard for "relation-like" stuff. But what was in question is why SQL is the standard. Did it take that position because of its deviation? If so, that would suggest the theory doesn't just work. Without actually profiling, I suspect that the deviation allows some real-world optimizations to take place, enabling SQL databases to be faster than something with strict adherence to the theory. That would be a good reason why you might have to choose SQL over a strict alternative. > Can you give an example of a query that cannot be expressed well in relational algebra Seems not. CloudFlare blocked the submission, complaining that I was submitting a SQL query, which it thinks is a security concern for some reason... In lieu, just think about what a relation is and how SQL is not relational. Even some of the simplest select queries you can imagine can demonstrate your request.
- int_19h 3y agoIt took that position because it was what the first viable RDBMS used, pretty much. Similar to how JavaScript became the standard PL for browsers. The simplest SQL queries map perfectly to relational algebra, so I'm still unclear as to what you had in mind. The two major deviations that SQL has over strict relational algebra are non-uniqueness of rows in a table, and NULL. The first one rarely comes up in practice, and any bag of non-unique rows can be trivially mapped to a bag of unique tuples simply by adding synthetic IDs to them. And SQL NULL semantics is widely considered to be a mess even by many users of SQL itself. With respect to performance, NULLs can be implemented very cheaply while optimizing their relational equivalent (1:0-or-1 relation) requires a little bit more effort on the DB side, but it's still such a simple pattern that I don't see a problem here.