Prolog as a Database Language