Work towards using events to access the database