[Info-vax] Teaching, was: Re: Any stronger versions of the LMF planned ?
Arne Vajhøj
arne at vajhoej.dk
Thu Aug 12 10:28:45 EDT 2021
On 8/12/2021 8:15 AM, Simon Clubley wrote:
> On 2021-08-12, Lawrence D?Oliveiro <lawrencedo99 at gmail.com> wrote:
>> Then, a decade or two later, came along these things called
>> ?relational databases?, which were enthusiastically adopted by
>> businesses--the very market that COBOL was supposedly optimized
>> for.
>>
>> But it turns out the best way to interface to a relational DBMS is
>> to generate SQL query strings. And for that, you need decent string
>> handling, with facilities for format substitution, argument quoting
>> and the like. None of which were envisaged in the original design
>> of COBOL.
>
> Are you kidding me ????? :-( :-( Is that what is taught in university
> ? :-(
>
> If _that_ is what is being taught today then that is a perfect
> example of how teaching and teachers are completely out of touch with
> the real world.
>
> You need to learn the SQL syntax and how to apply it to applications
> but you should be using a parameter based API to actually build the
> SQL query.
They should learn SQL and they should of course use parameters.
But in majority of cases they will actually use an ORM not SQL.
> The _only_ time building a SQL query string manually is acceptable
> is if what you are using is so old that it does not support parameter
> based SQL statements.
There are a few cases where parameters cannot be used and one need to
fallback to string concatenation even if the database API generally
support parameters.
>> So today, even a language like Python, Perl or (spit) PHP would be
>> a better fit for ?business needs? than COBOL ...
>
> How well do these languages handle decimal data ?
Python fine.
PHP will require an external library but such exist.
I don't know about Perl.
Java, C#, VB.NET, VMS Basic, Delphi etc. also got decimal types.
> There's a reason why that is the preferred format in business
> applications.
Yes.
Arne
More information about the Info-vax
mailing list