Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best Practice - Internal Code field for Heirarchial table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Best Practice - Internal Code field for Heirarchial table
Divers
Thread ID:
00937935
Message ID:
00937935
Vues:
59
Hi all

I have this table which is displyed as a TreeView and is self-joined. The fields are as under:

iID - Unique ID
iPID - Parent record's ID
cName
cCode - Code field for which this query is about
iSrNo - related to code field

This will have records as below:
1      0      ABC              001            1
2      1      ABCChild1        001001         1
3      1      ABCChild2        001002         2
4      1      ABCChild3        001003         3
5      3      ABCGranChildof2  001002001      1
so on
This code is not a specification, but I felt that it may be required, but then it has it's own processing and management overheads. The reason I had thought this would be necessary is because, I had felt that when I report I can ask for a report based on cCode = "001" or cCode = "001002" and the node and all it's children will come up.

Similarly the iSrNo field is to allow the user to change the display order of the children nodes like for eg. the user wants the ABCChild3 to preceed ABCChild2 then he can change the Sr. No. from 3 to 2 and 2 to 3 (I will modify cCode accordingly on save).

Have I done it right or there are better ways to do and get the same results.

Please advise.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform