Callback-based database system