Change SQL structure,Operations and Add new log