Since the relationship from runs->lanes->pools->samples->projects can be quite deep, as well as projects->samples->pools, etc, it may be useful to "cache" what projects and samples are in a pool. This is especially the case when pools are pooled into pools!
Consider keeping a many-to-one relationship of samples->pool and projects->pool, each time a pool has samples or pools added. This will be much more efficient to search such as for project->pools or run->lane->pool->projects or run->lane->pool->samples.
Since the relationship from runs->lanes->pools->samples->projects can be quite deep, as well as projects->samples->pools, etc, it may be useful to "cache" what projects and samples are in a pool. This is especially the case when pools are pooled into pools!
Consider keeping a many-to-one relationship of samples->pool and projects->pool, each time a pool has samples or pools added. This will be much more efficient to search such as for project->pools or run->lane->pool->projects or run->lane->pool->samples.