Re: Databases as objects

From: Marshall <marshall.spight_at_gmail.com>
Date: 23 Dec 2006 13:36:21 -0800
Message-ID: <1166909781.459616.252730_at_i12g2000cwa.googlegroups.com>


On Dec 23, 12:41 pm, Thomas Gagne <tga..._at_wide-open-west.com> wrote:
>
> What I propose to do I can do without an OOPL. I can do without any
> programming language. I could do it using only SQL stored procedures
> inside an RDB. Sitting in front of my interactive SQL session instead
> of typing SQL for every business transaction I needed to repeatedly
> perform I would enter the name of a stored procedure(s). Programming
> languages add little to that except automation.
>
> There's no OO programming involved. Zip. Zilch.

Okay, so it's procedural.

> I'm not thinking of operations performed once/year. I'm thinking of
> operations performed thousands of times every minute, or even thousands
> of times every day. You don't see value in creating a procedure for that?

I don't. And if a given abstraction is valueless, it will be valueless no matter
how frequently or infrequently it is used.

Thomas, are you familiar with the evolution of a programmer's mental model as he moves from a simple procedural model to an OO one? As in the transition from C to C++? You know how, when folks first start down that path, they are simply adapting their old models to the new constructs? Instead of coherent object abstractions, they simply use classes as a kind of grouping for procedures, etc. etc. "You can write fortran in any language." And in general, as long as people stay in that phase, they don't see a lot of value to OO (which is not surprising, since they're incapable of deriving much benefit at that point.) And they insist on viewing every new thing through their old lens, and interpreting what they see according to what works and doesn't work in their former way of doing things.

That's where you are with SQL. You're thinking about SQL in OO terms. And as long as you do so, as long as you continue to view SQL through the values and techniques you learned with OOP, your understanding will remain shallow. And the stuff you'll propose to those of us who do think relationally natively will be seen to be primitive and regressive. I'm sorry to have to put it so baldly, but I don't know any other way to say it. Note that you will *never* make this leap if you simply continue to think of data management in OO terms, if you only hang out on comp.object where everyone does that, if you think a foreign key is a pointer and a SQL table is physical.

To make the leap, you have to set down (temporarily!) your old ways of thinking and pick up the new stuff, and try it on in good faith. Learn the viewpoint that it comes from. Learn the techniques it has for doing what it does. SQL and OOP are almost exactly the same age, and each has spent a long time adapting to its area. SQL's area is data management, and it does it much, much better than any general purpose programming language does.

Marshall Received on Sat Dec 23 2006 - 22:36:21 CET

Original text of this message