# MongoDB

<table data-header-hidden><thead><tr><th width="163.5"></th><th></th></tr></thead><tbody><tr><td>Read</td><td>Yes</td></tr><tr><td>Write</td><td>No</td></tr></tbody></table>

JMap Server can connect to MongoDB to extract spatial data and attributes to be used as a spatial data source.

NoSQL database systems such as MongoDB are widely used in cloud applications. They have made it possible to solve important problems that traditional SQL database management systems have encountered (rigid schemas, lack of scalability, limited performance).

You need to connect to a MongoDB system (<https://www.mongodb.com/en>) stored locally or in the cloud. MongoDB offers a local application, MongoDB Compass and a web application, MongoDB Atlas that allow you to access data.

The data or documents are organized in collections (analogous to relational database tables) stored in databases that integrate “clusters” (MongoDB deployments). The clusters are organized into projects.

<table data-header-hidden><thead><tr><th width="166.5"></th><th></th></tr></thead><tbody><tr><td><strong>Parameters</strong></td><td> </td></tr><tr><td>Connection string</td><td>Enter the MongoDB cluster connection string that contains your data.<br>To get the connection string:<br>1. Sign in to a MongoDB Compass or MongoDB Atlas account.<br>2. Select the project that contains the data you are interested in.<br>3. In the section of the cluster that contains the data, press <strong>Connect</strong>. A window opens for you to select the connection method.<br>4. Select <strong>Connect your application</strong> to connect JMap to the MongoDB cluster. A window opens displaying the connection parameters.<br>5. Press <strong>Copy</strong> in the connection string range. Instructions for completing the chain are displayed in the window.<br>6. Paste the connection string in the section <strong>Connection string</strong> in JMap. You must replace <code>&#x3C;password></code> with the cluster password and <code>&#x3C;dbname></code> with the name of the database that will be used by default for the connection.<br>7. Press <strong>Load</strong>. The connection process may take a few moments.</td></tr><tr><td>Database</td><td>Select the database in which the data collection is located.</td></tr><tr><td>Collection</td><td>Select the data collection to connect to.</td></tr><tr><td>Id Field</td><td>Select the attribute that is considered the JMap identifier of the data.</td></tr><tr><td>Projection</td><td>Select the original projection of the data.</td></tr></tbody></table>

Data loading can take some time due to the lack of structure of the data collections.
