Implemented a listener interface for database events.