design sql generation and schema rules