3 ms·
SQL isn't a general purpose language, it's a data query language. It fulfils its purpose and does it well.
by GenericsMotors 7y ago
SQL isn't a general purpose language, it's a data query language.
It fulfils its purpose and does it well.
- weberc2 7y agoThat's only true tautologically--i.e., if you decide to constrain "its purpose" to the set of things SQL does well. If you want to do something perfectly reasonable--like programmatically building queries to access data of arbitrary (read "unknown at compile time") schema, you'll find it's quite hard to do this, at least if you care about performance at all. Largely because SQL doesn't compose well.
- GenericsMotors 7y agoOptimization requires knowing the schema, and query usage patterns, and data stats - which competent RDBMS engines use to great effect already. Sounds like you're looking for a magic silver bullet - there's no free lunch in our field though. Lastly, the comment I was replying to can be paraphrased as "well is SQL is so great why aren't RDBMS' built using SQL, huh?". Which is a ridiculous question since SQL isn't the right tool for that job - its very name tells you that. If you want to continue arguing against strawmen do it with someone else.
- ErwinSmout 7y agoNot true. Since the addition of SQL/PSM (1996 IIRC) it has become a computationally complete language (procedural like many of the others) with variables and loops and what have you.