add db write event