Note that there are some explanatory texts on larger screens.

plurals
  1. POSearching an unorderd list of descendants
    primarykey
    data
    text
    <p>In my Delphi 2007 database application, I have a list of Generations. Each Generation has a list of pricing templates, each of which is a set of values. In the application, the user can create a line item and assign a pricing template from any generation. A new generation is created by cloning an existing generation. So the user only has to create the first generation, then clone it and only change the required pricing template values in the new generation. These generations(and pricing templates) are connected by originids.ie, Generation1's originid will be zero and generation2 will have originid pointing to generation1' id etc. Also, the user can create a new generation from any of the existing ones.ie, generation3's origin can be generation1. Now, the user wants a refresh functionality where the user can update the pricing templates from a generation to any other generation if they are "connected". ie, If they connected by origin ids (Not necessarily by a direct connection.ie,If the source generation's origin id is pointing directly to the target's id or any of the direct children of target, or any of the children of the target's children..etc). Please see the description below. </p> <p>What is the best way to search (algorithm /data structure) for a target from a source in this case? </p> <p>Thank you all in advance,<br> Pradeep</p> <hr> <p>GenerationName --Id -- OriginID </p> <p>Generation 1 -- 100-- 0<br> Generation 2 --101 --100 (Cloned from 1)<br> Generation 3 --102 --100 (Cloned from 1)<br> Generation 4 --103 --102 (Cloned from 3)<br> Generation 5 --104 --101 (Cloned from 2) </p> <p>Here,the user can update from Generation 1 to Generation 3(Generation 1Generation 3) or Generation 4(Generation 1Generation 3Generation 4) or Generation 5((Generation 1Generation 2Generation 5) because they are connected. But Generation 3 to generation 5 is not allowed because there is no link between them.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload