Hi there,
I'm just starting out with db and have encountered a problem when using PHPRunner... The db is for forest survey information, where we have info from trees which are in plots, which in turn are in different locations. Each level (location/plot/tree) has it's own table with the following primary keys:
- Locoation -> SiteID
- Plot -> SiteID and PlotID
- Tree -> SiteID, PlotID and TreeID
In other words, the primary key for a given tree is composed of 3 fields: SiteID, PlotID and TreeID. In PHPrunner, it is set up that the location table is the only one where a menu item is created such that the other tables are accessed through the location table. In the plot table, the master-detail relationship is done through a link through the Location table and the SiteID primary key. All is well.
The problem arises in the Tree table. The master-detail relationship points to the Plot table with the plot Primary key. Is it possible to select primary keys composed of multiple fields (i.e. SiteID and PlotID), or do I have to create a unique primary key in each table and refer to this key ?
Thanks in advance for any answers to this newbie question...
Robert