• 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: Lachlan Deck <email@hidden>
  • Date: Fri, 17 Mar 2006 23:32:34 +1100

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' ;-)


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.


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


_______________________________________________ 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: "Jerry W. Walker" <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>)

  • Prev by Date: Re: Implementing a pivot table / cross table
  • Next by Date: Re: deployng trouble, can you help me?
  • Previous by thread: Re: Implementing a pivot table / cross table
  • Next by thread: Re: Implementing a pivot table / cross table
  • Index(es):
    • Date
    • Thread