Notes on consistency checking The consistency checker's checks can be grossly divided into two sorts: I. Internal consistency checks. For example: A. When the entities contain relations that form a cycle, the cycle should be consistent. For example: 1. When study A contains matrix B, and matrix B contains taxon label C, then taxon label C should refer to study A. 2. When submission A contains study B, which contains phylotree C, then phylotree C should be associated back to submission A. B. Certain sets should be nonempty. For example: 1. Every study should have at least one analysis 2. Every taxon label should appear in at least one analyzed data object 3. Every matrix should have at least one row 4. Every tree should belong to an analysis 5. Every analysis should belong to a study II. External consistency checks. For example: A. For each matrix supplied by Bill from TB1, there should be a matrix in the database with the same title and the same number of rows. B. For each study supplied by Bill from TB1, there should be a study in the database with the same title, the same number of trees, and the same number of matrices.