Working on Database functions for Sales and Items