+Added database factory.