> For the complete documentation index, see [llms.txt](https://rqndomhax.gitbook.io/versaapi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rqndomhax.gitbook.io/versaapi/databasemanager.md).

# DatabaseManager

## Retrieving the DatabaseManager

To get the database manager you need to follow this

```java
IDatabaseManager databaseManager = api.getDatabaseManager();
```

{% hint style="info" %}
Now you need to get the NoSQL's database
{% endhint %}

```java
MongoDatabase database = databaseManager.getDatabase("versa"); // here the name of the database is "versa"
```

{% hint style="info" %}
You also need to get the collection where you want to work with
{% endhint %}

```java
MongoDatabase database = databaseManager.getDatabase("versa");                         // here the name of the database is "versa"
MongoCollection<BasicDBObject> collection = database.getCollection(database, "users"); // here the collection is named "users"
```

```java
MongoCollection<BasicDBObject> collection = database.getCollection("versa", "users"); // here is another way to do it
```

{% hint style="success" %}
We will use the variables we just made for the database's guide
{% endhint %}
