• Nick,

    As much as I agree with your general point that integrity should be enforced at the data layer, not the application etc...  I think you shot yourself in the foot when you advocated the use of what I call Massively Unified Code-Key (MUCK) tables. 

    The number of tables in a "schema" isn't what complicates things, it is much more often the inappropriate combining of things into fewer tables that complicates both enforcement of integrity constraints and querying.  This is the whole purpose of normalization, eliminate dependencies in your tables so that integrity CAN be enforced through the use of Primary and Foreign Keys.  See my article on the subject for a more detaied treatment of the subject.

    /*****************

    If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek

    *****************/