change db relationship, add tests around it