Distributed database mediator system