add a flag to indicating whether the operation needs to inset the data into database