saving nested collection
Database
2
Posts
2
Posters
0
Views
1
Watching
-
- first of all i want to save a TreeView in database i designed a table with three fields (ID , NodeName,UpareNodeID) and create a relation ship with ID and UpareNodeID is it correct? i want to know if there is a better solution to save and retrieve this kind of collection 2) the second problem : how can i make a relationship from a field to another in the same table in ms access 2007 ? thanks!
-
- first of all i want to save a TreeView in database i designed a table with three fields (ID , NodeName,UpareNodeID) and create a relation ship with ID and UpareNodeID is it correct? i want to know if there is a better solution to save and retrieve this kind of collection 2) the second problem : how can i make a relationship from a field to another in the same table in ms access 2007 ? thanks!
All the fields in each row in your table, are automatically related to each other, by being in the same row. You can not and do not need to create any relationship. If you want to relate values from one row to those in another row, you will have to create two tables, and create a relationship between those. So for example something like: Table 1: Nodes (ID, NodeName) Where ID is unique Tabl e2: UpareNodes (ID, NodeName, Parent_ID) Relation: Nodes.ID = UpareNodes.Parent_ID
My advice is free, and you may get what you paid for.