# Relational Database Clusters

## Relational Database Clusters

The DNAnexus Relational Database Service provides users with a way to create and manage cloud database clusters (referred to as `dbcluster` objects on the platform). These databases can then be securely accessed from within DNAnexus jobs/workers.

The Relational Database Service is accessible through the application program interface (API) in AWS regions only. See [DBClusters API page](/developer/api/introduction-to-data-object-classes/dbclusters.md) for details.

{% hint style="info" %}
A license is required to access the Relational Database Service. [Contact DNAnexus Sales](mailto:sales@dnanexus.com) for more information.
{% endhint %}

### Overview of the Relational Database Service

#### DNAnexus Relational DB Cluster States

When describing a DNAnexus DBCluster, the **status** field can be any of the following:

| DBCluster status | Details                                                                                         |
| ---------------- | ----------------------------------------------------------------------------------------------- |
| `creating`       | The database cluster is being created, but not yet available for reading/writing.               |
| `available`      | The database cluster is created and all replicas are available for reading/writing.             |
| `stopping`       | The database cluster is stopping.                                                               |
| `stopped`        | The database cluster is stopped.                                                                |
| `starting`       | The database cluster is restarting from a stopped state, transitioning to available when ready. |
| `terminating`    | The database cluster is being terminated.                                                       |
| `terminated`     | The database cluster has been terminated and all data deleted.                                  |

#### Connecting to a DB Cluster

DB Clusters are not accessible from outside of the DNAnexus Platform. Any access to these databases must occur from within a DNAnexus job. Refer to this page on [cloud workstations](/developer/cloud-workstation.md) for one possible way to access a DB Cluster from within a job. Executions such as [app/applets](/user/running-apps-and-workflows/running-apps-and-applets.md) can access a DB Cluster as well.

The parameters needed for connecting to the database are:

* `host` Use `endpoint` as returned from [`dbcluster-xxxx/describe`](/developer/api/introduction-to-data-object-classes/dbclusters.md#api-method-dbcluster-xxxx-describe)
* `port` `3306` for MySQL Engines or `5432` for PostgreSQL Engines
* `user` `root`
* `password` Use the `adminPassword` specified when creating the database [`dbcluster/new`](/developer/api/introduction-to-data-object-classes/dbclusters.md#api-method-dbcluster-new)
* For MySQL: `ssl-mode` 'required'
* For PostgreSQL: `sslmode` 'require' Note: For connecting and verifying certs, see [Using SSL/TLS to encrypt a connection to a DB instance or cluster](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)

#### DBCluster Instance Types

The table below provides all the valid configurations of dxInstanceClass, database engine and versions

| DxInstanceClass   | Engine + Version Supported                                                         | Memory (GB) | # Cores |
| ----------------- | ---------------------------------------------------------------------------------- | ----------- | ------- |
| db\_std1\_x2 (\*) | aurora-mysql: `8.0.mysql_aurora.3.04.1`, aurora-postgresql: `12.9`, `13.9`, `14.6` | 4           | 2       |
| db\_mem1\_x2      | aurora-mysql: `8.0.mysql_aurora.3.04.1`, aurora-postgresql: `12.9`, `13.9`, `14.6` | 16          | 2       |
| db\_mem1\_x4      | aurora-mysql: `8.0.mysql_aurora.3.04.1`, aurora-postgresql: `12.9`, `13.9`, `14.6` | 32          | 4       |
| db\_mem1\_x8      | aurora-mysql: `8.0.mysql_aurora.3.04.1`, aurora-postgresql: `12.9`, `13.9`, `14.6` | 64          | 8       |
| db\_mem1\_x16     | aurora-mysql: `8.0.mysql_aurora.3.04.1`, aurora-postgresql: `12.9`, `13.9`, `14.6` | 128         | 16      |
| db\_mem1\_x32     | aurora-mysql: `8.0.mysql_aurora.3.04.1`, aurora-postgresql: `12.9`, `13.9`, `14.6` | 244         | 32      |
| db\_mem1\_x48     | aurora-mysql: `8.0.mysql_aurora.3.04.1`, aurora-postgresql: `12.9`, `13.9`, `14.6` | 384         | 48      |
| db\_mem1\_x64     | aurora-mysql: `8.0.mysql_aurora.3.04.1`, aurora-postgresql: `12.9`, `13.9`, `14.6` | 488         | 64      |
| db\_mem1\_x96     | aurora-postgresql: `12.9`, `13.9`, `14.6`                                          | 768         | 96      |

\* - db\_std1 instances may incur CPU Burst charges similar to AWS T3 Db instances described in [AWS Instance Types](https://aws.amazon.com/rds/instance-types/). Regular hourly charges for this instance type are based on 1 core, CPU Burst charges are based on 2 cores.

## Restriction on Transfers of Projects Containing DBClusters

If a project contains a [DBCluster](/developer/api/introduction-to-data-object-classes/dbclusters.md), its ownership cannot be changed. [A PermissionDenied error occurs](/developer/api/data-containers/projects.md#api-method-project-xxxx-update) when attempting to change the `billTo` of such a project.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.dnanexus.com/user/objects/relational-database-clusters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
