# REST Resource: projects.locations.catalogs.databases

- [Resource: Database](https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases#Database)
  - [JSON representation](https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases#Database.SCHEMA_REPRESENTATION)
- [HiveDatabaseOptions](https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases#HiveDatabaseOptions)
  - [JSON representation](https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases#HiveDatabaseOptions.SCHEMA_REPRESENTATION)
- [Type](https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases#Type)
- [Methods](https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases#METHODS_SUMMARY)

## Resource: Database

Database is the container of tables.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "deleteTime": string, "expireTime": string, "type": enum (`https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases#Type`), // Union field `options` can be only one of the following: "hiveOptions": { object (`https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases#HiveDatabaseOptions`) } // End of list of possible types for union field `options`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The resource name. Format: projects/{project_id_or_number}/locations/{locationId}/catalogs/{catalogId}/databases/{databaseId} |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The creation time of the database. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The last modification time of the database. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `deleteTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The deletion time of the database. Only set after the database is deleted. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `expireTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when this database is considered expired. Only set after the database is deleted. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `type` | ``enum (`https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases#Type`)`` The database type. |
| Union field `options`. Options specified for the database type. `options` can be only one of the following: ||
| `hiveOptions` | ``object (`https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases#HiveDatabaseOptions`)`` Options of a Hive database. |

## HiveDatabaseOptions

Options of a Hive database.

| JSON representation |
|---|
| ``` { "locationUri": string, "parameters": { string: string, ... } } ``` |

| Fields ||
|---|---|
| `locationUri` | `string` Cloud Storage folder URI where the database data is stored, starting with "gs://". |
| `parameters` | `map (key: string, value: string)` Stores user supplied Hive database parameters. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

## Type

The database type.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | The type is not specified. |
| `HIVE` | Represents a database storing tables compatible with Hive Metastore tables. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases/create` | Creates a new database. |
| ### `https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases/delete` | Deletes an existing database specified by the database ID. |
| ### `https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases/get` | Gets the database specified by the resource name. |
| ### `https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases/list` | List all databases in a specified catalog. |
| ### `https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/projects.locations.catalogs.databases/patch` | Updates an existing database specified by the database ID. |