Moving functions to TradeDAO to make sure the DB is updated.