--- In [email protected], Blair Cox <[EMAIL PROTECTED]> wrote:
>
> Hi Amy,
> 
> Well, I have complete control over the database. This where we 
might have a
> problem, it seemed at the time that creating a table with around 
200 columns
> would be unreasonable. A table was created to handle each of the 
products.
> Each product has as many as 20-30 columns and for the most part, do 
not
> relate to each other. I pondered over normalization for over a 
week. 

Personally, I'd have added three tables to handle the unique 
properties.  So, you'd have a PropertySets, that would just be a 
bunch of "containers" for properties, related to GroceryType in your 
main grocery table.  Then, I'd have a PropertySetProperties, which 
would be all the properties available in each set.  Then I'd have 
ItemProperties, which would be the specific property values at each 
item.  Still four tables, but MUCH easier to add properties and 
allows for a single cohesive approach and set of logic.  True, you 
will have to put logic in place to enforce type based on what gets 
entered in the PropertySetProperties table, but nothing's perfect.

> But now
> look at the issue...
> 
> Hmm, what would be the issue in creating a single arrayCollection 
from all
> sources? How would this differ in any way from loading a single 
enormous
> array directly from the db? Looks like I¹m down to two options, 
recreate the
> db and over half the constructed application to deal with the 
changes in
> code, or figure out a way to combine the tables within the 
application or
> the Union query as you suggested.

If your charts are essentially going to be showing the same data for 
each type, it shouldn't be much of a biggie to use a Union query, 
because they should already have fields that are showing the 
equivalent values.

Or use the icky way I suggested ;-).  I usually don't set 
dataProviders immediately, since that information usually isn't 
available until later (I'm bringing mine in through 
ExternalInterface).

You could look here, and see if the way I did it might work for you:

http://flexdiary.blogspot.com/2008/08/charting-example.html

HTH;


-Amy

Reply via email to