3 ms·
1) templating constructs or env vars? The programming languages can provide that too, but... prepared statements and variable-based substitution was a huge impr
by AtlasBarfed 4y ago
1) templating constructs or env vars? The programming languages can provide that too, but... prepared statements and variable-based substitution was a huge improvement to SQL code from programming languages (at least in java and ruby). Why wasn't that part of the SQL standard, why did it have to evolve organically? If it was in the specification, so many SQL injection vulns would have been avoided.
2) SQL statement syntax should start with the table specification so you can get autocompletion help when doing the columns and other expressions. The INSERT statement has it right, while SELECTs suck because the columns are specified before the WHERE clause, so there is no context. At least provide alternate syntaxes like SELECT FROM <table> COLUMNS <cols> WHERE <whereclause>, it would be minimal for the DB vendors to support.
3) SQL standards have been too nice to vendors, especially Oracle. The lack of portable SQL between databases has hamstrung the industry.
4) Stored procedure standards should have been formalized, as should standard apis. JDBC/ODBC were ok, but why are programming languages doing major enhancements/de facto standards setting?