improved SQL table definition