• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Implementing a pivot table / cross table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing a pivot table / cross table


  • Subject: Re: Implementing a pivot table / cross table
  • From: "Jerry W. Walker" <email@hidden>
  • Date: Fri, 17 Mar 2006 10:07:56 -0500

Hi, Lachlan,

On Mar 17, 2006, at 7:32 AM, Lachlan Deck wrote:

Hi there,

On 17/03/2006, at 10:19 PM, Jerry W. Walker wrote:

I've never implemented a cross table in WO (or in any other environment, for that matter), but if, by cross table, you mean a table used to statistically derive information about the relationships between the row and column elements, then I question doing it in WO at all.

Awe come on Jerry, stick with the programme: 'anything you can do WO can do better' ;-)

Darn, Lachlan, I try, I really do try... :-)

You must have missed the part where I said that I've never implemented a cross table. So I didn't do it and won't ask WO to. ;-)

If it's a statistical cross table, then the focus is on a table which is easily implemented in an relational database.

Hmm. Just thinking out loud... I'd suppose, as with any problem domain, that the focus is on the ultimate 'view' of the data. That view we happen to call an Object. An Object (in theory) is oblivious to where the data comes from that it receives.

I think Rico's problem domain is that of a statistical table, which fits quite conveniently into an rdb table. Given that the problem domain thinks of the data in a cross table as a "table of data", and that there are very convenient tools out there for working with the data in that form, I think that WO would tend more to get in the way than to help in this particular case (he says as a lover of NEARLY all things WO).


For more insight into this problem domain, check here:

   http://www.roselladb.com/cross-table.htm

So I think that Jean-François's message was probably a good deal more helpful to Rico than mine.

Regards,
Jerry

So, the simple/default view (for most WO Apps) correlates to a single row from a single table. i.e., an EOEnterpriseObject with properties and relationships as defined in a corresponding EOEntity instance. The info on the attributes and relationships are relevant to the view.

So, let's say we want a Cross-join (the Cartesian product of the compared tables) that's akin to:
SELECT * FROM Actor CROSS JOIN Movie


The derived view will contain rows consisting of all columns from Actor followed by all columns from Movie. That should mean that at the point you know of the tables (err woops, I mean Entities) that are to be involved in the cross-join (and in what order) you now have the information necessary to dynamically build an EOEntity with the corresponding attributes. All that's needed is yourEOEntity,setExternalQuery("SELECT t0.name, etc....FROM Actor t0, Moview t1");

But, at some point (when the database grows) you'll need to be able to cull the list of results. Perhaps raw rows would be a better approach...

with regards,
--

Lachlan Deck




--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems


    email@hidden
    203 278-4085        office



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Implementing a pivot table / cross table
      • From: Jean-François Veillette <email@hidden>
References: 
 >Implementing a pivot table / cross table (From: Rico Landefeld <email@hidden>)
 >Re: Implementing a pivot table / cross table (From: "Jerry W. Walker" <email@hidden>)
 >Re: Implementing a pivot table / cross table (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: Session Timeout Question
  • Next by Date: Re: Session Timeout Question
  • Previous by thread: Re: Implementing a pivot table / cross table
  • Next by thread: Re: Implementing a pivot table / cross table
  • Index(es):
    • Date
    • Thread