Subject Re: [IBO] How would I go about making a grid show this classification
Author Helen Borrie

At 07:37 AM 23/05/2005 +0300, Antti Kurenniemi wrote:
>I don't know the proper term for this, but I think it's quite common thing
>to do: I have a customer table, and a classification table. Each customer
>can have n different classifications, so there is an intermediate table
>linking customer_id to classification_id.
>Now, I want to show the classifications on a window with the customer data
>(a grid or a list). I was able to do the master-detail stuff with the
>samples, as well as lookups, but this one I couldn't figure out myself.
>Could someone point me to some document explaining how to do this, or better
>yet, is there a sample available? If my explanation wasn't clear, let me
>know and I'll try to make more sense ;-)

This is simpler than you think it is. :-))

Have three IB_Query objects: one for the customer set (master), one for
the intersection table (detail to customer set, master to classification
set) and one for classifications.

The customer and classification sets are in grids. The intersection set
remains invisible to the user, i.e., no links to any controls.

The intersection set is detail to the customer set, via its customer_id
key. The classification set is detail to the invisible intersection set,
pointing its classification_id to classification_id in the intersection set.

When you scroll the customer set, the classifications for that customer
will be what you see in the classification grid. (I think that is what you
are looking for.)

Each is just an ordinary master-detail setup. We generally call this
rather common structure "Master-detail-detail", or MDD.