Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best Practice - Internal Code field for Heirarchial tabl
Message
De
08/09/2004 07:04:21
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00937935
Message ID:
00940229
Vues:
27
>Hi Dirk
>
>Thanks for your views on this thread.
>
>>we use a separate tabel caled hierachy
>>it has some key values like Hirachy art, customer Number, next level, Total Level
>>total level is a very lond C field and a program generets the Key like
>>123.234.345. where 234 is the next level and 123 is the to level.
>>the key contains al customer numbers aft the tree . There are N differt tees possible. Because the selection ot the tree is done with the art key.
>
>Though I do not have a seperate table for heirarchy, I use the same table for heirarchy and accounts. I originally had a similat cCode field which had values like 123234345 but that was what I wanted to remove due to data management tasks.
>
>>The treevie is generatet from this field. Tts extremly fast if you load 20.000 customers in a tree it takes less than 60 sevonds on a local mashine.
>
>Wow that is fast.
>
>>We build a class using first microsift treeviue, but changed to DBI tree this year.
>>It has a selector of the tree art and then starts loding the tree.
>>you can select how many levels you want to load and you can got down an load dynamicly more nots.
>
>I my MS treeview I have borrowed code that does just that it will load upto 2-3 levels only, then when the user clicks on a node + sign that nodes children are loaded.
>
>>If you are intersted in more details let me now.
>
>Thanks. I am open to newer ideas with less data mamangement tasks for us programmers. Kindly email me the details you have to share on venussoftop@postmark.net

Bhavbhuti,
I don't remember if I suggested you to read and download sample from June 2001 UT magazine. In that it shows a fast way of loading a tree fast (on demand loading rather than load all nodes). TV loading is slow by nature :( Downside of approach is that you can't use TV and its methods to collect all children.
OTOH an SQL cursor keeping all info with keys that tree would use is lightning fast to create (compared to loading). So even if a node's children are not populated yet still you could use cursor to collect all children, grandchildren, grandgrand...
Think what if explorer tried to load all folders when it's called:)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform