You don't really need to map from prolog to perl, its pure semantics. You need to map from prolog to SQL via perl. Once you have achieved an effective mapping that way (possibly via a database schema compiler followed by a runtime interpreter or something), then you have achieved two things:
in reply to Choosing a data structure for AI applications
1. Gained all the benefits of advanced database optimisation in your fact storage and lookup
2. Achieved in one fell swoop persistance, load balancing, and external non-perlog access to the facts.
That said, it still isn't gonna be easy. Good luck :)