MongoDB Features
From DreamFactory
MongoDB is a very popular NoSQL database and comes with most pre-built DreamFactory installs. The MongoDB service type can connect to local or remote MongoDB servers.
Common Feature Exceptions
- MongoDB, like most NoSQL database, doesn't have defined schema for each tables, except the _id which is always there in every table and created by default. Therefore, the _schema resource doesn't support field level operations.
- While DreamFactory supplies a SQL-like filter string conversion to MongoDB's native filter language, the service also supports the native filter language represented as a JSON string.
Requirements
- PHP extension mongodb (for > 2.1, but mongo may be required for older DreamFactory versions) is required to be installed or compiled in. Check here for installation help.
Configuration
- dsn - String. Required. The connection string for the service, i.e. mongodb://[username:password@]host1[:port1][,host2[:port2:],...][/database][?options]. The username, password, and database values can be added in the connection string or in the options below. For further information, see https://docs.mongodb.com/manual/reference/connection-string/#connection-string-options.
- options - Object/Associative Array. Optional. An array of options for the connection. For further options, see https://docs.mongodb.com/manual/reference/connection-string/#connection-string-options.
- driver_options - Object/Associative Array. Optional. An array of options for the MongoDB driver, currently just supporting \"context\". For further information, see http://php.net/manual/en/mongo.connecting.ssl.php#mongo.connecting.context.ssl.