There are no constraints that can be used to ensure document_ranking contains a row for every pair of document ID and ranking name, so missing rows must currently be handled with a tedious sequence of joins.
There should instead be triggers that insert into this table automatically when a new document is added, or when a new ranking is added.
There are no constraints that can be used to ensure
document_ranking
contains a row for every pair of document ID and ranking name, so missing rows must currently be handled with a tedious sequence of joins.There should instead be triggers that insert into this table automatically when a new document is added, or when a new ranking is added.