Realizing an efficient and incremental access to an object oriented database with Prolog