Define contract for generic SQL; update constraints and utilities