check complex constraints implemented as views at each INSERT
No need for so much JOIN in constraints as we use PKs
fix size of hash columns
remvoe useless constraint