Tree structure with more than one table [message #7731] |
Tue, 31 May 2022 03:57 |
htManager
Messages: 434 Registered: May 2014
|
Senior Member |
|
|
Have you ever created a flexible tree structure with more than one table?
I ask because I would like to map a structure with organizations, clubs, seasons, teams and team members. However, the data of the respective tables are stored in different tables. The tables can be linked to each other using the primary keys.
Is there a way to achieve this in _cm_getNodeData()?
|
|
|
|
|
|
|
Re: Tree structure with more than one table [message #7738 is a reply to message #7736] |
Fri, 03 June 2022 04:49 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
The tree structure contains only three tables - TREE-TYPE, TREE-LEVEL and TREE-NODE with which you can construct many types of different tree structures. A LEAF is a table in your application database which can contain a foreign key into one of the TREE-NODE entries. When I say "one" I mean one within a particular TREE-TYPE, so it is possible for a LEAF to contain foreign keys into TREE-NODEs with different values for tree_type_id.
If you want you could use your LEAF table as just a stepping stone and have another table acting as a CHILD-LEAF, with multiple rows if necessary, and then in a third application table you could have a foreign key into CHILD-LEAF instead of LEAF.
You still have not provided me with a pictorial example of what structure you are trying to achieve, so I cannot provide a definitive solution.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|