Updates to DB code for order piece