improved sql backend tests