Re: S.O.D.A. database Query API - call for comments
Date: Sat, 21 Jul 2001 18:01:44 GMT
Message-ID: <3AF2ED2F.6FC8DC4B_at_informix.com>
Todd Gillespie wrote:
> In comp.databases Tobias Brox <tobiasb_at_suptra.org> wrote:
> :> How about storing objects
> :> as column values in table rows. Then you can keep a declarative query
> :> language and be able to call methods on columns.
> : Hm ... having one complete object as a single attribute in a table row?
> : Must be a reference in that case? Or just a piece of binary data?
> : I'm not sure if that's a good idea. For one thing, the data within the
> : object will be encapsulated, searching will be difficult. For the other
> : thing, I think it might make sense to call methods on a table row. I.e.
> : you have some geometrical data about a box in a table row, but not the
> : volume. The volume can be returned through a method.
>
> We like to call that a function, or a stored procedure according to your
> flavor.
Just FYI: storing objects as attribute values is precisely what nearly
all modern (O)RDBMS products do. Some of them do it a *lot* better than
others. There is a query language standard (SQL-3) that sets out what the DML
looks like, and component standards (SQL-J, OLE) that explain how to link
components into the DBMS engine.
Look at: http://www.postgresql.org/ for documentation on an open-source
DBMS product that does this. On another thread (ADT or something) I have
provided an example of what it all looks like. Or have a look at the following
http://www.amazon.com/exec/obidos/ASIN/1558606424/qid%3D988998486/002-1526694-9052009
BTW: Terminology thing: functions and stored procedures aren't quite the same thing. Stored procedures embed declarative SQL within procedural code (looping, branching, etc). The kinds of SQL functions we're talking about can be thought of as more like 'methods' in an OO language or sub-routines if you prefer functional decomposition. They perform discrete operations on their arguments, and return a data result without affecting the underlying database in any way. (Do these polygons overlap? What is the moving average of this time-series? How many characters do these fingerprints share?) Received on Sat Jul 21 2001 - 20:01:44 CEST
