api and database events comparison