# REST Resource: databases

- [Resource: Database](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases#Database)
  - [JSON representation](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases#Database.SCHEMA_REPRESENTATION)
- [SqlServerDatabaseDetails](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases#SqlServerDatabaseDetails)
  - [JSON representation](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases#SqlServerDatabaseDetails.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases#METHODS_SUMMARY)

## Resource: Database

Represents a SQL database on the Cloud SQL instance.

| JSON representation |
|---|
| ``` { "kind": string, "charset": string, "collation": string, "etag": string, "name": string, "instance": string, "selfLink": string, "project": string, // Union field `database_details` can be only one of the following: "sqlserverDatabaseDetails": { object (`https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases#SqlServerDatabaseDetails`) } // End of list of possible types for union field `database_details`. } ``` |

| Fields ||
|---|---|
| `kind` | `string` This is always `sql#database`. |
| `charset` | `string` The Cloud SQL charset value. |
| `collation` | `string` The Cloud SQL collation value. |
| `etag` | `string` This field is deprecated and will be removed from a future version of the API. |
| `name` | `string` The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| `instance` | `string` The name of the Cloud SQL instance. This does not include the project ID. |
| `selfLink` | `string` The URI of this resource. |
| `project` | `string` The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| Union field `database_details`. `database_details` can be only one of the following: ||
| `sqlserverDatabaseDetails` | ``object (`https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases#SqlServerDatabaseDetails`)`` |

## SqlServerDatabaseDetails

Represents a Sql Server database on the Cloud SQL instance.

| JSON representation |
|---|
| ``` { "compatibilityLevel": integer, "recoveryModel": string } ``` |

| Fields ||
|---|---|
| `compatibilityLevel` | `integer` The version of SQL Server with which the database is to be made compatible |
| `recoveryModel` | `string` The recovery model of a SQL Server database |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases/delete` | Deletes a database from a Cloud SQL instance. |
| ### `https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases/get` | Retrieves a resource containing information about a database inside a Cloud SQL instance. |
| ### `https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases/insert` | Inserts a resource containing information about a database inside a Cloud SQL instance. |
| ### `https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases/list` | Lists databases in the specified Cloud SQL instance. |
| ### `https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases/patch` | Partially updates a resource containing information about a database inside a Cloud SQL instance. |
| ### `https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/databases/update` | Updates a resource containing information about a database inside a Cloud SQL instance. |