Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to resolve structured data ??
Message
From
26/10/2005 08:15:21
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Germany
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How to resolve structured data ??
Environment versions
Visual FoxPro:
VFP 9
Database:
MySQL
Miscellaneous
Thread ID:
01062177
Message ID:
01062177
Views:
71
Hello Everbody

We have a table rbobjekte with structured data (like bill of material)
rbobjekteid ,rboberobjektid (the objectid of the object above), .....

The startpoint of a structure has objectid = rboberobjektid

Example:
start = aera x (rbobjekteid=111,rboberobjektid=111)
building a in aera x (rbobjekteid=4711,rboberobjektid = 111)
building b in aera x (rbobjekteid=4813,rboberobjektid = 111)
building c in aera x (rbobjekteid=4333,rboberobjektid = 111)

floor 1 in building a (rbobjekteid=5711,rboberobjektid = 4711)
floor 2 in building a (rbobjekteid=6711,rboberobjektid = 4711)
floor 3 in building a (rbobjekteid=5731,rboberobjektid = 4711)

floor 1 in building b (rbobjekteid=35711,rboberobjektid = 4813)
floor 2 in building a (rbobjekteid=6711,rboberobjektid = 4813)

room a in floor 1 of building a (rbobjekteid=46711,rboberobjektid = 5711)

....

I have an application that shows strucured customer data in a treeview All objects are treeview nodes that you can expand or shrink

Table objects holds 1500000 records
Table services holds 80000000 records
and both are still growing

To resolve a customer aera(l_startobjekt) we use the following comand via odbs against a maxdb database

l_cmd = "DECLARE RNAME CURSOR FOR WITH RECURSIVE TMPOBJ " +;
"(LEVEL, rbobjekteid, oberobjektid) " +;
" AS (SELECT 1, ro.rbobjekteid, ro.oberobjektid " +;
" FROM rbobjekte ro " +;
" WHERE oberobjektid = ?l_startobjekt "+;
" UNION ALL SELECT TMPOBJ.LEVEL + 1, ro.rbobjekteid, ro.oberobjektid
" FROM rbobjekte ro , tmpobj " +;
" WHERE ro.oberobjektid = TMPOBJ.rbobjekteid)"+;
" SELECT tmpobj.* FROM TMPOBJ order by tmpobj.level,tmpobj.rbobjekteid"

DO p_sqlcmd IN p_funktionen WITH p_verbindungsnr,l_cmd,(thisform.l_cursor)

(8000 objects in 1 second !!!)

We have a similar table in foxpro (9.0) and i don't know, how to do the resolving in foxpro (same performance ??)

Any help or ideas welcomed
Best regards
Albert
Next
Reply
Map
View

Click here to load this message in the networking platform