sql design fix