Re: Databases as objects
Date: 22 Dec 2006 07:01:12 -0800
Message-ID: <1166799672.162727.248760_at_h40g2000cwb.googlegroups.com>
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"
>
> Additionally, I can ask the database to give me a list of its procedures
> (its interface), but without them all I have is its tables. True, I can
> tell a lot from the tables and a nice diagram, but I can tell a lot more
> from a list of procedures and their arguments.
>
> That list of procedures is the interface I'm talking about. After
> populating a database with tables, views, and triggers, why keep talking
> to it using SQL when I can improve my application's interface to it by
> creating a domain-aware interface with intention revealing named procedures?
>
> True, I can do everything in SQL that I can do in procedures (they're
> written in SQL after all), but the procedures have an improved interface
> and protect the integrity of my model. I could also write whatever
> bytecodes SQL is compiled into rather than SQL, but SQL is an improved
> interface and protects the integrity of the relational engine. I could
> even access the database's data directly on disk, but SQL is an improved
> interface over the bytecodes which are improved over doing my IO.
>
I introduced myself to this group with a little parody http://groups.google.com/group/comp.databases.theory/tree/browse_frm/thread/16f8e2a48bf7cdee/c6afb5776e727eca?rnum=11&q=kvnkrkptrck&_done=%2Fgroup%2Fcomp.databases.theory%2Fbrowse_frm%2Fthread%2F16f8e2a48bf7cdee%2F5a41db9357aef1b7%3Flnk%3Dst%26q%3Dkvnkrkptrck%26rnum%3D3%26#doc_d0674565740f9e99 At the time, I had a hard time understanding how certain members of CDT failed to see right through it. In my mind, it was utterly transparent baloney - how could it possibly be mistaken for anything but parody?
Having read this response, I feel obliged to offer Bob Badour and other misled CDT contributors a second apology. Received on Fri Dec 22 2006 - 16:01:12 CET