RE: Query object contained within a Query object

2005-07-22 Thread HOFLee _
>>I suspect it has more to do with the fact that people have specific
>>expectations about what's in a query object than anything else. People have
>>a two-dimensional mental model of what a recordset is, and nesting one
>>recordset within another would break that model. 

You may very well be right.  Perhaps it is simply the usage of the word "query" 
in this context that makes people start screaming in horror ;-) I'm not saying 
that I necessarily disagree, but I guess XML expanded *my* concept or perhaps 
definition of "recordsets".  So the idea of either a query within a query or a 
structure within a query  is not quite as horrifying to me as it might have 
been years ago.  However, this is primarily a excercise in exploration and just 
satisfying my own curiousity.

Thanks for sharing your thoughts.

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212673
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Query object contained within a Query object

2005-07-22 Thread HOFLee _
>>> Claude Schneegans
>The result would be the same, but the sub-query would not have to be 
>copied into the main query, and there would be a difference on performance.

I would think that the sub-queries would not be "copied" into the main query.  
In java, objects like structures are passed by reference. So I would assume 
(perhaps incorrectly) that queries objects would not be "copied", and that 
adding the sub-query to the main query would just add a reference not a copy of 
the object.


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212672
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Query object contained within a Query object

2005-07-22 Thread Claude Schneegans
 >>While I am aware of most of the alternatives, I'm more interested in 
understanding the pratical reasons why this method is not used.

There would definitely be a performance problem, especially if the 
sub-queries are big queries.
Although I didn't try it, I think one of these alternative would be to 
leave the sub-query where it is and just store its name in the above 
query, then use QUERY="#aboveQuery.subQueryName#" instead of 
QUERY="#aboveQuery.subQuery#".
The result would be the same, but the sub-query would not have to be 
copied into the main query, and there would be a difference on performance.
Another alternative would be to store the SQL code in the main query and 
perform the sub query only inside the loop.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212530
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Query object contained within a Query object

2005-07-22 Thread Paul Hastings
Dave Watts wrote:
> recordset within another would break that model. In any case, I haven't yet
> encountered a need to use this construct, so this discussion is fairly
> academic to me.

well i could see the benefit for something like the cfpop query's mail
headers (though as a structure rather than a query). having that info in
a structure as opposed to a big gob of text would be nice (say for
parsing the actual received date out of a pop3 message).


~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212493
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Query object contained within a Query object

2005-07-21 Thread Dave Watts
> For the purposes of my question ... "yes" ;-)While I am 
> aware of most of the alternatives, I'm more interested in 
> understanding the pratical reasons why this method is not 
> used. 

I suspect it has more to do with the fact that people have specific
expectations about what's in a query object than anything else. People have
a two-dimensional mental model of what a recordset is, and nesting one
recordset within another would break that model. In any case, I haven't yet
encountered a need to use this construct, so this discussion is fairly
academic to me.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212469
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Query object contained within a Query object

2005-07-21 Thread HOFLee _
>Claude Schneegans
>That is the question.
>One can sure use loops on queries inside loops on queries, but do we 
>need to store them inside each others ?

For the purposes of my question ... "yes" ;-)While I am aware of most of the 
alternatives, I'm more interested in understanding the pratical reasons why 
this method is not used. 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212467
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Query object contained within a Query object

2005-07-21 Thread HOFLee _
>I think my biggest problem with doing this is, the performance cost of
>query objects. Aside from file handling query objects seem to be one
>of the worst performing objects in coldfusion.
>
>Adam H

Yes, I would expect query objects to be more expensive than an arrays.  Any 
stats/links or explanations about the exact difference in performance costs, 
specifically of query objects versus structures?


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212441
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Query object contained within a Query object

2005-07-21 Thread Claude Schneegans
 >>and am wondering if there is a good reason why.

That is the question.
One can sure use loops on queries inside loops on queries, but do we 
need to store them inside each others ?


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212433
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Query object contained within a Query object

2005-07-21 Thread Adam Haskell
I think my biggest problem with doing this is, the performance cost of
query objects. Aside from file handling query objects seem to be one
of the worst performing objects in coldfusion.

Adam H

On 7/21/05, HOFLee _ <[EMAIL PROTECTED]> wrote:
> Thank you both for your responses.
> 
> >>Personnally, I'd be more interested in hearing "why this would be a *good* 
> >>idea?"
> 
> Primarily because query objects can be used with the cfoutput/cfloop tags 
> which IMO provide a simpler and cleaner method for accessing the related 
> information than structures or array objects. While a simple array/structure 
> is pretty straight-forward, I think it takes a lot more code and is less 
> intutive to retrieve information from a similar construct composed of nested 
> arrays/structures.
> 
> I've seen structures of structures used before, but not queries within 
> queries and am wondering if there is a good reason why.
> 
> 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212427
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Query object contained within a Query object

2005-07-21 Thread HOFLee _
Thank you both for your responses.

>>Personnally, I'd be more interested in hearing "why this would be a *good* 
>>idea?"

Primarily because query objects can be used with the cfoutput/cfloop tags which 
IMO provide a simpler and cleaner method for accessing the related information 
than structures or array objects. While a simple array/structure is pretty 
straight-forward, I think it takes a lot more code and is less intutive to 
retrieve information from a similar construct composed of nested 
arrays/structures. 

I've seen structures of structures used before, but not queries within queries 
and am wondering if there is a good reason why.

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212421
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Query object contained within a Query object

2005-07-21 Thread Claude Schneegans
 >>Because anybody looking at the code wouldn't at first understand what is

>>going on.

I don't think this is a good reason. If somebody looking at
""
is not able to understand what's being done, he better not have
access to the code anyway.

Personnally, I'd be more interested in hearing "why this would be a *good* 
idea?"

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212374
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Query object contained within a Query object

2005-07-20 Thread Jared Clinton
Because anybody looking at the code wouldn't at first understand what is
going on.

If you do something weird to it, it will cost more to matain that particular
piece of code. 

That's why.

Jared Clinton
NEC Business Solutions.

-Original Message-
From: Lee _ [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 21 July 2005 3:10 PM
To: CF-Talk
Subject: Query object contained within a Query object

For my own edification, I'm interested in learning the reasons why the
following would *NOT* be a good idea:

Storing a query object within another query object, like:
 

I am aware that you can accomplish a similar effect by constructing an array
of structures or a structure of structures, etc.  However, what I am really
interested in is a constructive critique of the query within a query method.


Any thoughts or explanations would be appreciated. 

Thanks in advance.




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212363
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54