update db relations