> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Introduction ## Article: Introduction ## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/cms/external-databases/external-database-connection/introduction.md ## Article Content: # About the External Database Connections API > **Note for app developers:** Wix Data APIs require the site's [code editor](https://dev.wix.com/docs/develop-websites/articles/get-started/development-environments.md) to be enabled. If you are building a Wix app, add a [data collections extension](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/data-collections/about-data-collections-extensions.md) to automatically enable the code editor and create data collections when your app is installed on a site. The External Database Connections API enables you to connect an external database to a Wix site. ## Internal vs. external databases Wix provides a comprehensive full-stack platform with integrated database capabilities. However, certain projects may have specific requirements that make it necessary to use an external database. For example, you might need to access data that is already stored on an external service, or you might need the data to be stored in a relational database. The External Database Connections API allows you to create and manage the connection between the site and the external database. Once the connection is established, you can access the external collection using Wix Data APIs in the same way you would with a native collection. You can use the [Data Collections API](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections.md) to create, modify, and delete data collections. Similarly, you can use the [Data Items API](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items.md) to access and manage data within those collections. The external collection can also be accessed through the Content Management System (CMS) or with site code, connected to user input elements, or used to create dynamic pages. ## Before you begin It's important to note the following points before starting to code: - To establish a connection between a site and an external database, you must [prepare an external database adaptor](#prepare-an-external-database-adaptor). - To enable read-write access to the external database using the [Data Items API](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items.md), make sure the external database's table or schema includes the following fields: - `_id` - `_createdDate` - `_updatedDate` - `_owner` If these fields are absent, access to the external database is read-only. ## Prepare an external database adaptor To establish a connection between a site and an external database, prepare an external database adaptor. An external database adaptor is a server that translates data requests from a Wix site or app into the external database's protocol, and translates the response back into a format that Wix APIs can read. This enables Wix APIs, apps, and sites to treat the external database as if it were an internal data collection. You can prepare an external database adaptor in one of the following ways: - [Deploy an out-of-the-box adaptor](https://dev.wix.com/docs/api-reference/business-solutions/cms/external-databases/external-database-connection/sample-flows.md) for a single site using this API. - [Build your own adaptor](https://dev.wix.com/docs/api-reference/business-solutions/cms/external-databases/external-database-connection/sample-flows.md) for a single site using this API. - [Become an external database service provider](https://dev.wix.com/docs/api-reference/business-solutions/cms/external-databases/external-database-service-plugin/introduction.md) by building your own adaptor for one or more sites using a Wix app. When making the adaptor available with an app, you don't need to call this API. @sdk_package_setup