A Logic Framework for P2P Deductive Databases