statonlab / tripal_manage_analyses

GNU General Public License v3.0
0 stars 1 forks source link

database integrity: feature-designed analysis needs to be taken into account. #32

Open bradfordcondon opened 6 years ago

bradfordcondon commented 6 years ago

@laceysanderson said in https://github.com/GMOD/Chado/issues/59

I would worry a bit about this causing inconsistencies in the database. For example, what if your transcripts for a given analysis are for species X and the linker table points to species Y? I think this might be better implemented as a materialized view that pulls through the analysis -> feature -> organism connection. From an application standpoint this ends up being the same thing but from the database level it will help you keep consistency. Would that work for HWG ?

bradfordcondon commented 6 years ago

Perhaps the trigger could check if the organism for the current feature being inserted is in the organism_analysis table and if not, adds it?

So 2 things need to happen.