update database relationships