added methods to write to DB for Product and Customer