Re: Queries and OO

From: Doc O'Leary (droleary.usenet_at_2005.subsume.com)
Date: 01/09/05


Date: Sun, 09 Jan 2005 05:53:04 -0600

In article <1105187499.122160.231670@c13g2000cwb.googlegroups.com>,
 "frebe" <fredrik_bertilsson@passagen.se> wrote:

> After some debates at this forum I have made the conclusion that the
> concepts of queries does not exists within OO. The only *correct* way
> to find objects is through other objects (including collection
> objects).

Your conclusion makes no sense. You firstly don't define what exactly
you consider a query (let me assume you mean something like SQL), nor do
you say why a database table/row/column cannot be considered objects.
You can easily get the same kind of query ability if your OO environment
supports introspection (so you can refer to attributes) and uniquing
(i.e., a master record of all objects).

> If I have a number of "orders", I can find them by id if
> first I put them into a map using id as they key. If I want to get them
> ordered by "delivery data", I have to put them into a sorted set. If I
> want a list of "orders" that come from a given "customer", "customer"
> need to have a list of "orders" that belong to it.

What's your point? If you have a number of "orders", you can only find
them by id in a database if you first put them into a table. To get
them ordered by "delivery data" you have to specify their sort ordering.
If you want the orders for a specific customer, duh, you have to specify
that customer!



Relevant Pages

  • Re: Anyone running FCP on an Intel?
    ... Tony wrote: ... It makes sense for a customer to specify the tools to use IF they ... anticipate the possibility of either having to redo it another day or take ...
    (rec.video.desktop)
  • Re: Anyone running FCP on an Intel?
    ... It makes sense for a customer to specify the tools to use IF they ... anticipate the possibility of either having to redo it another day or take ...
    (rec.video.desktop)
  • Re: REGION=0M and LSQA
    ... If the customer does not use IEFUSI and did not specify any region parm in the jes deck and does not use iealimit, then all the IBM defaults are taken. ...
    (bit.listserv.ibm-main)
  • Re: Updating multipile rows from an order history form ( ie same id)
    ... >> displays the order history for each customer eg. ... but I'm not sure how to specify the variables to update ... I have the following php as an example of when I alter the campaign ...
    (alt.php)