finished database relations