Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One Table (Treeview)
Message
From
22/05/2006 04:54:48
 
 
To
21/05/2006 06:23:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01120782
Message ID:
01123879
Views:
29
Hi Dirk,

Once you build core hierarchy maintaining functionality
it is relatively easy to create multiple hierarchies by simply
adding prefix like
CU1-[001.002... (Customers Classif. 1)
CU2-[001.002... (Customers Classif. 2)
IT1-[...
IT2-[...
etc

For multiple hierarchy structures, my preferance wld be to keep them separately from tables that they serve (in separate tables or DBCs) , as generic as possible, and completely hidden behind class object walls.
That class object (and hkey DBC behind it) can serve ALL tables that
are in need of being classified this way.

By storing tree/levels parameters/definitions separately, and by NOT storing separator character within the hkey, you should be able to squeese somewhat that huge 180 char hkey.
In reality, these kinds of trees might never expand the same on each level, so by defining level sizes according to nature of the H-structure, you can actualy build let say 10-15 levels using effectively 'only' 30-40 chars hkey.

Step further wld be to build methods/procs for upsizing/downsizing inner level sizes, alowing them to be sort of *dynamic* within total hkey size.

Never tried DBI grid, but I can assume that it improves quiet a bit presentation layer of the whole concept.



>what we do
>wee see hirary structure in many databases
>
>customers
>articles
>turnover versions
>and so on
>
>that why we ha one tabel structure
>
>the tabel has different keys
>
>1. structure belonggs to tabel art...
>2. Name of structure (there are n structures for articles cistomers
>3 key next level
>4 Hierary key
> the hirarchy key field ist 180 cararters long
>a programm generates the hirarchie number
>it looks like
>123.234.345......
>
>it always starts at the highest level and can have up to 14 levels
>the . is the separator for the levels. If you have . in your numbers you need an othe one
>
>teh programm checkes if ther is a dataset in the main tabel wher the next level information is missing and automaticly generates a referenz dataset under a secific not ( name structure missing)
>
>During generation of the structure field the integrity of the tree is chcked an a protokoll in excel is generatet if ther are some inconsistend information (not missing, boken tree)
>
>In the largest instalation we have 25 different structures and customer tabels up to 250.000 recards
>
>we use DBI tree because you can ad different coulums
>the treevie claas has a popup ontop and the´user can select the structure for the data the he needs.
>
>dirk
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform