Functional mongodb