Re: Databases as objects
Date: Fri, 22 Dec 2006 11:59:21 -0500
Message-ID: <FNednWDfgJZ_kxHYnZ2dnUVZ_uW3nZ2d_at_wideopenwest.com>
Bob Badour wrote:
Are we still in disagreement?
> kvnkrkptrck_at_gmail.com wrote:
>
>> Thomas Gagne wrote:
>>
>>> Marshall wrote:
>>>
>>>> On Dec 21, 1:33 pm, Thomas Gagne <tga..._at_wide-open-west.com> wrote:
>>>>
>>>>> ... the
>>>>> database is an object, which should hide its data and only be used
>>>>> through its interface, just like they do with other objects in their
>>>>> models.
>>>>
>>>> The interface to the database is the schema and SQL.
>>>> What do you think the interface is?
>>>
>>> After I've created a database for my application's data (let's pretend
>>> its a bookstore) I can either talk to it with low-level DML from
>>> applications
>>>
>>> INSERT (title, author)
>>> VALUES ("Complexity", "M. Mitchel")
>>> INTO catalog
>>>
>>> Or I can create a higher-level interface that knows something about my
>>> bookstore
>>>
>>> exec p_addBook _at_title="Complexity", @author="M. Mitchel"
>
> One wonders exactly how Mr. Gagne considers a simple imperative
> statement involving a single value 'higher-level' than the simplest
> version of a rich imperative statement involving sets of propositions
> and first-order logic in all its glory. By choosing the least among
> data statements to compare against the best among OO statements, Mr.
> Gagne showed that the best of OO can match the least of SQL--itself
> the least among decent data languages.
>
> Without even getting into a good data language but sticking with SQL,
> speculate on the OO equivalent of the following ad hoc program:
>
> <snip great SQL>
Bob, you're misunderstanding me. I do not want to replace SQLese with
OOese. I'm suggesting that the wonderful SQL you posted can be made
into a DB-stored procedure to facilitate reuse, and that it is better
for multiple programs to call the procedure than for each to embed the SQL.
-- Visit <http://blogs.instreamfinancial.com/anything.php> to read my rants on technology and the finance industry.Received on Fri Dec 22 2006 - 17:59:21 CET
