Towards an Integrated Database-Prolog System