implements mysql and mongodb abstraction based on doctrine2