Re: Theoretical Basis for SELECT FOR UPDATE

From: David Cressey <david.cressey_at_earthlink.net>
Date: Wed, 05 Oct 2005 13:40:09 GMT
Message-ID: <ZIQ0f.10483$q1.3364_at_newsread3.news.atl.earthlink.net>


"Roy Hann" <specially_at_processed.almost.meat> wrote in message news:OMWdnbmYMJain97enZ2dnUVZ8t2dnZ2d_at_pipex.net...

> All very erudite no doubt, but you asserted that spaghetti code caused
> deadlocks, which is just wrong and I showed you it is wrong.

Nitpick alert.
Actually, what you showed is that non spaghetti code CAN cause a deadlock. This invalidates the assertion that ONLY spaghetti code can result in deadlocks.
There's a small difference between what you showed and what you said you showed.
End of nitpick alert.

Actually, I'm reading vc's position as follows: Sloppy, undisciplined coding can lead to deadlocks. Careful programming practice can avoid deadlocks. Spaghetti code is just one instance of sloppy, undisciplined coding.

That may be a mischaracterization of vc's actual position.

In any event, I disagree with that position, and I think your example shows that even careful coding can yield deadlocks. I don't regard "hints" to the DBMS as part of "careful programming". I regard it as "getting physical with the DBMS".

In a prior thread, vc told me that a programmer would never need to know which indexes were created, "unless he were a database programmer". I let that terminology slip by, because I wanted to stay on topic. But I think it comes up here, again,

When an applications programmer starts issuing "hints" to let the database engine know what's really going on, I think the logical/physical boundary has become hopelessly blurred. To me, the application programmer is a COBOL or Java programmer, that knows enough SQL to use it as a data sublanguage. That's it.

The fact that products like Oracle extend SQL into a procedural language like PL/SQL obscured the difference between a data sublanguage and a programming language. I presume something similar happens with SQL server.

And I think this confusion of language, in turn, obscures the essential difference between a Data Base Management System and an Applications Development Environment. And I think a lot of the hoo hah in this newsgroup results from obscuring that essential difference. Received on Wed Oct 05 2005 - 15:40:09 CEST

Original text of this message