Re: SQL programming fundamentals

From: Niall Litchfield <niall.litchfield_at_gmail.com>
Date: Fri, 12 Sep 2008 12:19:22 +0100
Message-ID: <7765c8970809120419g4e1d48fdg4e6770b863afe818@mail.gmail.com>


On Fri, Sep 12, 2008 at 10:37 AM, Peter Robson <peter.robson_at_gmail.com> wrote:
> Hello Oracle-L,
>
> I have been 'lurking' on this list for manyyears. Time was when I
> contributed regularly, but now I'm content to read. Until now...
>
> I have been reviewing the latest volume by Chris Date due for imminent
> publication by O'Reilly, and I want to test within the wider SQL community
> some of the assertions that Chris makes. My own position is studiously
> neutral for the purposes of this exchange.
>
> How important do you believe it to be that any person who uses SQL in the
> context of their profession, should understand the relational theory and its
> logical underpinnings?

My answer to that almost certainly hinges upon what is meant by "any person who uses SQL". In the broader senses in which it is possible to interpret that remark I'd answer no. There will be, indeed are groups of people, possibly large groups of people, who can quite reasonably functionally use SQL without such an education. Some people will know that in a former life I was an accountant, accountancy - specifically double entry bookkeeping, but many other practices as well - have a long and well established theoretical underpinning (yes there are people who not content with the dullness of accounting delve into theory of accounting!). There are many people who engage with the accounting toolset to achieve good accounting results without that understanding and education. I'd suggest that the data query and management world is similar.

What would be extremely desirable in my view though would be if there was a much higher level of understanding of relational theory amongst those people responsible for systems design, performance analysis,application development, tool design and language design (though I suspect that the latter 2 are influenced by commercial considerations rather than by a lack of understanding per-se). If a developer or architect is designing a datastore for an application or service I'd most certainly want them to understand relational theory and to have the toolset that allows them to easily and reliably model and query in accordance with that theory. In fact it would be nice if toolsets assumed that any data design conformed to, say 3rd normal form, and didn't permit some of the atrocities that happen in practice. (I have no illusions that a 'do not enforce relational modelling' option would be added to any such tool and many people would then choose to set that permanently but still).

> Should such practitioners understand relational
> calculus (specifically the 'tuple relational calculus')?

I think that's a harder question to answer, for those practitioners I have suggested need to understand relational theory, I suspect that there is no real way of deeply understanding the relational model without understanding the mathematical calculus that underpins it, and yet insisting on this would likely effectively kill off any hope of building (mostly) relational systems in the real world. There aren't enough graduate level mathematicians available to do the job (I don't believe you need such a degree, but you'd need to be capable of such a degree). So I'd like to say yes (and rule myself out) but practically would suggest no as a suitable answer!

Do I get points for having a good idea what Chris' assertions are :)

-- 
Niall Litchfield
Oracle DBA
http://www.orawin.info
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Sep 12 2008 - 06:19:22 CDT

Original text of this message