Would it not be better to make the child table into an array indexed by its
ID, then make a single pass thru the parent table using the child ID into
the array.

Mike

On Sunday, March 15, 2015, Keith Clarke <[email protected]> wrote:

> Folks,
> Is there a ‘smart’ way to denormalise ‘child' & ‘parent' CSV tables
> extracted from an RDBMS in LiveCode or is it down to iterating through
> lists using chunk functions?
>
> I have four tables, related in the database as
> Child-Parent-GrandParent-GreatGrandParent. Each file has its own record ID
> & the ID of its direct parent. I need to create a ‘DenormalisedChild' file
> with GrandParent & GreatGrandParent IDs appended to each row.
>
> I’m currently assuming the only way forward is to build a
> tDenormalisedChild variable by repeated iteration at each ‘level’:
> Iterating through lines of the Child file to compare its ChildParentId
> with each row in the the Parent file, until ParentRowId = ChildParentId;
> Repeat (1) on Parent file rows to find ParentGrandParent values;
> Repeat (1) on GrandParent file rows to get GreatGrandParent values
>
> Is their a more efficient approach?
> Best,
> Keith..
> _______________________________________________
> use-livecode mailing list
> [email protected] <javascript:;>
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to