fixed setup database for relation