---
url: /statelake/administering-statelake/designer/data-connections.md
---

# Data Connections

**Statelake** needs to know where the data it is working with is located, and the **Data Connections** provide a pointer to this data location.

By being a separate module from the **Data Definitions**, it allows you to create a single **Data Definition** and use it against multiple similar data sources in different locations simply by assigning a different **Data Connection**.

A **Statelake Connection** captures the details of where data is coming from, or going to. For example, a source **DB Connection** that is being used for input, or a destination **File Connection** that is being used for output.

**Connections** will include details such as database names and file directory paths, however, connections do not describe the data structures themselves. For that, please refer to [Data Definitions](/statelake/administering-statelake/designer/data-definitions/).

The **Connection** name should always be *friendly*, and relevant to its purpose - it is the name that the **Connection** will be known as throughout the configuration, so you should enter something meaningful to help you recognise it.

## Database (DB) Connections Overview

The **DB Connection** is the **Statelake** module under the **Data Connections** umbrella that is used to identify the specific database that contains the data being read from or written to, and details where that database is located.

So a **DB Connection** is simply a pointer to a database.

**Statelake** automatically creates a default **DB Connection** when the **Statelake Configuration** is initially created, which forms and maintains the link between the **Statelake Configuration** and the underlying structure database for that configuration. This built-in **DB Connection** is called \_Self.

**Statelake** has drivers for the major SQL databases that provide direct high-speed access through the databases client library. ODBC and ADO connections are also available for databases that do not have specific connections.

**DB Connections** are used on all **Data Definitions**. For **File Definitions** and **Web Definitions**, this allows you to reference data from a database against the information in the **File Definition** or **Web Definition**, although commonly you do not need to reference data in this way, and instead use bespoke SQL command in the **Map**. However since you need to assign a **DB Connection** to a **File Definition** and **Web Definition**, it is recommended that you create a default **DB Connection** that points to your **Statelake** configuration database, and use this on the **File Definitions** and **Web Definitions**.

By being a separate module from the **DB Definition**, you are able to create a single **DB Definition** and use it against multiple similar databases in different locations, simply by assigning a different **DB Connection**.

When assigning a **DB Connection** to a **DB Definition**, it is considered a design-time assignment.

When coming to use the **DB Definition** in an **Action**, you have the chance to re-assign the **DB Connection**. This allows you to use the same **DB Definition** in multiple **Actions** each with their own **DB Connection**. This is known as a run-time assignment.

A **DB Connection** is similar to a **System Connection**, but serves a different purpose:

* A **System Connection** refers to (the whole of) a **Statelake** configuration database, for use with **Statelake Designer**.
* A **DB Connection** is a **Statelake** component, held within a configuration database, and typically refers to a separate, non-**Statelake** application database, such as CRM, or accounting.

For details, please refer to [DB (Database) Connections](/statelake/administering-statelake/designer/data-connections/db-database-connections/).

## File Connections Overview

Also under the **Data Connections** umbrella, the **File Connections** module is somewhat similar to **DB Connections**.

But where the **DB Connections** detail information relating only to the database, **File Connections** is a configuration module that points to a specified file directory that holds the input source file, or will hold the output destination file.

**File Connections** provide a pointer to a local file repository, or folder. You configure the **File Connection** with the appropriate details for locating or creating a file.

Any files that are processed are done so in this local repository. **Transports** are used to send or receive files from this local repository.

By being a separate module from the **File Definition**, you are able to create a single **File Definition** and use it against multiple similar files in different locations, simply by assigning a different **File Connection**.

When assigning a **File Connection** to a **File Definition**, it is considered a design-time assignment.

When coming to use the **File Definition** in an **Action**, you have the chance to re-assign the **File Connection**. This allows you to use the same **File Definition** in multiple **Actions**, each with their own **File Connection**. This is known as a run-time assignment.

For further information, please refer to [File Connections](/statelake/administering-statelake/designer/data-connections/file-connections).

## HTTP Connections Overview

**HTTP** is an acronym for **Hypertext Transfer Protocol**.

An **HTTP Connection** provides a pointer to a URL that is hosting one or more web services. These will probably be REST web services.

In **Statelake**, an **HTTP Connection** is most commonly used with **HTTP** Scripting.

You configure the **HTTP Connection** with the appropriate details for connecting to the web server.

Please refer to [HTTP Connections](/statelake/administering-statelake/designer/data-connections/http-connections/) for more information.

## SOAP (Web) Connections Overview

The **SOAP Connection** module provides a pointer to a Web Service.

**SOAP** is an acronym for **Simple Object Access Protocol** - a message protocol that enables the distributed elements of an application to communicate. **SOAP** can be carried over a variety of standard protocols, including the web-related **HTTP**.

You configure the **SOAP Connection** with the appropriate details for connecting to the specified web service.

By being a separate module from the SOAP Definition, you are able to create a single **SOAP Definition** and use it against multiple similar web services in different locations, simply by assigning a different SOAP Connection.

When assigning a **SOAP Connection** to a **SOAP Definition** it is considered a design-time assignment.

When coming to use the **SOAP Definition** in an **Action**, you have the chance to re-assign the **SOAP Connection**. This allows you to use the same **SOAP Definition** in multiple **Actions** each with their own **SOAP Connection**. This is known as a run-time assignment.

For more information on this connection, please see [SOAP (Web) Connections](/statelake/administering-statelake/designer/data-connections/soap-web-connections).
