> For the complete documentation index, see [llms.txt](https://docs.sdv.dev/sdv/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sdv.dev/sdv/integration/db.md).

# Connect Your Database

{% hint style="info" %}
❖ **SDV Enterprise Bundle**. This feature is available as part of the **AI Connectors Bundle**, an optional add-on to SDV Enterprise. For more information, please visit the [AI Connectors Bundle](/sdv/explore/sdv-bundles/ai-connectors.md) page.
{% endhint %}

We recommend connecting SDV to your database for the smoothest experience. After integration, SDV is automatically able to create metadata based on the database schema and import data to be used for training an SDV synthesizer.

```python
from sdv.io.database import AlloyDBConnector

# 1. Integration: Create a connector and set your config
connector = AlloyDBConnector()
connector.set_import_config('source_db_config.yaml')
connector.set_export_config('destination_db_config.yaml')

# 2. Usage: Use the API create metadata, import training data, and export synthetic data
metadata = connector.create_metadata(table_names=['users', 'transactions', 'sessions'])
data = connector.import_random_subset(metadata=metadata)
...
connector.export(synthetic_data)
```

## ❖ Browse Databases

Use the AI Connectors feature to directly connect to your database and import your data into SDV. Later you can use the same connector to export synthetic data into a new database.

<table data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td align="center">❖ <a href="/pages/F54BDHJVP9w5L8dr7WsX"><strong>AlloyDB</strong></a></td><td><a href="/pages/F54BDHJVP9w5L8dr7WsX">/pages/F54BDHJVP9w5L8dr7WsX</a></td><td><a href="/files/KjEOFNTR6aMYpuWgpDlU">/files/KjEOFNTR6aMYpuWgpDlU</a></td></tr><tr><td align="center">❖<a href="/pages/uyPLUnr7ataVTMb6J2m3"> <strong>BigQuery</strong></a></td><td><a href="/pages/uyPLUnr7ataVTMb6J2m3">/pages/uyPLUnr7ataVTMb6J2m3</a></td><td><a href="/files/O050Wnz7Y9WCpm9ttrEy">/files/O050Wnz7Y9WCpm9ttrEy</a></td></tr><tr><td align="center">❖ <a href="/pages/Z0tn260dgvDmBQ4cjs5t"><strong>MSSQL</strong></a></td><td><a href="/pages/Z0tn260dgvDmBQ4cjs5t">/pages/Z0tn260dgvDmBQ4cjs5t</a></td><td><a href="/files/ldRqEEC3a8W1nubkfHBK">/files/ldRqEEC3a8W1nubkfHBK</a></td></tr><tr><td align="center">❖ <a href="/pages/QA7wh44yF2ArSSbKevdJ"><strong>Oracle</strong></a></td><td><a href="/pages/QA7wh44yF2ArSSbKevdJ">/pages/QA7wh44yF2ArSSbKevdJ</a></td><td><a href="/files/azEeIrdLsAXS3R7iEOzg">/files/azEeIrdLsAXS3R7iEOzg</a></td></tr><tr><td align="center">❖ <a href="/pages/bVQ9aVdL5SpMtU4gV0ky"><strong>PostgreSQL</strong></a></td><td><a href="/pages/bVQ9aVdL5SpMtU4gV0ky">/pages/bVQ9aVdL5SpMtU4gV0ky</a></td><td><a href="/files/fuAuMsrWpvzKlMTPGm07">/files/fuAuMsrWpvzKlMTPGm07</a></td></tr><tr><td align="center">❖ <a href="/pages/pSn6fAYonezNLUtoiAjX"><strong>Spanner</strong></a></td><td><a href="/pages/pSn6fAYonezNLUtoiAjX">/pages/pSn6fAYonezNLUtoiAjX</a></td><td><a href="/files/7Va6tAifmqvxWKg0YcMH">/files/7Va6tAifmqvxWKg0YcMH</a></td></tr></tbody></table>

{% hint style="success" %}
**Request additional databases.** If your database provider is not covered by the list above, please [leave us a request](https://forum.datacebo.com/). If approved our team is able to add a connector for a relational database in a few weeks.&#x20;

*We prioritize requests made by customers who are using AI Connectors.*
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sdv.dev/sdv/integration/db.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
