Dao updated with right sqlquerys