name

abstract val name: String(source)

The unique name of this database.

This name must be unique within a MongoDB deployment.

  • Two databases cannot have a name that only differs by case (e.g. salesData and SalesData cannot coexist).

  • Once a database is created, you must always access it with the same case as when it was created. The creation of a database happens on the first write operation in one of its collections.

  • It is recommended to avoid the following characters: /\. "$*<>:|?. Depending on the platform MongoDB is running on, some of them may be forbidden.

  • The name cannot be empty.

  • The name cannot be longer than 64 bytes.

External resources