Sql defs