Adjust join and part to record to the DB