> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runway.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Databases basics

> Databases store your raw data and help you organize it. 

## What is a database?

When you connect an integration, your data flows into a database. You can then create additional databases that pull from this original database and aggregate the data at different levels. For example, if you import GL data with vendor-level details from QuickBooks, NetSuite, or Xero into a database, you can build another database that pulls from it and aggregates the data by department or class.

## Creating a database

The most common way to create a database is by clicking the **+** button next to a section or page in the sidebar. The new database will appear nested under that section or page.

Select **Database** as the type and give it a clear name, along with an icon or emoji for easy identification.

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/databases/1/create.gif?s=b554e7d11e0f78522f33fbbeadcdfbc0" alt="images/databases/1/create.gif" width="800" height="375" data-path="images/databases/1/create.gif" />

## Configuring a database

**After creating a database, the next step is to configure it.**

1. Click on the **configuration** header to expand it.
2. Select the **data source**—this can be an existing integration query or another database you've already created.
3. Choose the **drivers** you want to track. These are key metrics or dates you’d like to view as a time series.
4. Select the **dimensions** to segment your data. Segmentation determines the granularity of your database.
5. Add any extra dimensions from your data source that isn’t used for segmentation under **Other columns**.

For example, if you're pulling in GL data at the most granular level, you would select **Amount** as the **driver**, use **Account Name, Class, and Vendor** as the dimensions to **segment** the data, and include **Account Type** under **other Columns** to surface it as additional information.

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/databases-config.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=f8813e322e3a655a8ff1a6062b7783e6" alt="" width="2510" height="1680" data-path="images/databases-config.png" />

The dimensions you use to segment your data appear alongside the driver name across the app, including in tables and charts. To improve readability, we recommend using only the essential dimensions needed to define your database's granularity. Any additional useful information should be added under **Other columns** instead.

<img src="https://mintcdn.com/runway-5055a12e/_tyDrsjKuAGqMAvO/images/dimensions-pills.png?fit=max&auto=format&n=_tyDrsjKuAGqMAvO&q=85&s=fd3078302fc1a72b31590d77916fcd90" alt="" width="2290" height="1694" data-path="images/dimensions-pills.png" />

**Tip #1** – To get a quick look at the structure of your data source, click the **table icon** to preview sample data.

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/databases-config-preview.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=547e6896a57e13be40656bacd7d1ddd1" alt="" width="2322" height="1204" data-path="images/databases-config-preview.png" />

**Tip #2** – If you want to limit the database to a specific subset of data from the source, apply a **filter** within the database configuration.

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/databases-config-filters.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=8f36ed27f67850a5117fd920f2ec7cb1" alt="" width="2446" height="1046" data-path="images/databases-config-filters.png" />

## Adding a column

To create a new column, click the **+** button at the far right of the database. You’ll then see the following options:

1. **Number driver** – Use this for calculated values. Drivers store time-series data, meaning the values *can* vary from month to month, but they don’t have to. Learn more about number drivers [here](https://docs.runway.com/concepts/drivers/drivers-basics#driver-types).
2. **Date driver** – Works like a number driver but stores date values instead. Learn more about date drivers [here](https://docs.runway.com/concepts/drivers/drivers-basics#driver-types).
3. **Dimension** – A predefined list of values to help categorize your data. Unlike drivers, dimensions do not change over time. For example, in a GL database, dimensions could include **Vendor, Location, or Department**. Learn more about [dimensions here](https://docs.runway.com/concepts/dimensions/dimensions-basics).
4. **Lookup** – Automatically populate a dimension based on data from another database, similar to **VLOOKUP()** in spreadsheets. Learn more about [lookups here](https://docs.runway.com/guides/modeling/lookups).

<Note>
  For HRIS databases, the process of adding a column is different. Please follow the steps [here](https://docs.runway.com/concepts/databases/hris-databases#adding-columns-to-hris-databases).
</Note>

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/databases-new-column@2x.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=181b250aa79cb865b832483642fe9a2b" alt="" width="2590" height="1132" data-path="images/databases-new-column@2x.png" />

## Show a column as timeseries

As mentioned earlier, **drivers store time-series data**, meaning their values *can* vary from month to month. While we display them as a single column in the database for readability, each driver column can be expanded to access its time-series data.

To show a driver column as a time series, click on its name in the database header and select **Show as time series.** The column will expand and appear on the far right of the database after all other columns.

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/databases/1/show-column-as-timeseries.gif?s=0f393c95cb79202c496149605d959988" alt="images/databases/1/show-column-as-timeseries.gif" width="800" height="362" data-path="images/databases/1/show-column-as-timeseries.gif" />

<Note>
  If you choose to display a different driver column as a time series, it will automatically replace the current one, which will revert to being displayed as a value.
</Note>

By default, each row will display the **forecast formula, actual formula, and time-series data** based on the selected date range. If needed, you can hide the formula columns by clicking on their headers and selecting **Hide in blocks.**

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/databases-hide-column.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=bbf8615f649b6ffb2f5f36ca1f8fb1ef" alt="" width="3046" height="1380" data-path="images/databases-hide-column.png" />

You can also use keyboard shortcuts:

* `Option` +  `Shift` + `A` to hide or show the **Actual Formula** column.
* `Option` +  `Shift` + `F` to hide or show the **Forecast Formula** column.

Alternatively, click the **Customize** button in the top-right corner of the database, go to **Properties,** and show or hide formula columns by clicking the **eye icon**.

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/databases-properties.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=930cd1c58798bf44f718432f24a6f547" alt="" width="3046" height="1380" data-path="images/databases-properties.png" />

To revert a driver column back to a single value, click on its name in the database header again and select **Show as value.**

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/databases-show-as-value.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=d8dcb617d7e1179641547f60c3a6def5" alt="" width="3046" height="1380" data-path="images/databases-show-as-value.png" />

## Show all columns as timeseries

Instead of displaying only one driver column as a time series, you can choose to show **all** driver columns this way. Click **Customize** in the top-right corner, select **Display as**, and then choose **Time series.**

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/databases/1/show-all-as-timeseries.gif?s=a15f058e42e9adcce58c6b5e7b8274aa" alt="images/databases/1/show-all-as-timeseries.gif" width="800" height="365" data-path="images/databases/1/show-all-as-timeseries.gif" />

When you switch to this view, the database orientation changes. What was previously a **row** in the database becomes a **section**, while dimensions and drivers that were displayed as columns are now shown as **rows**. This allows you to see time-series data for all drivers at once.

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/database-as-timeseries.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=f2e460a754729ef0aa3eecce6d79a5c9" alt="" width="3086" height="1824" data-path="images/database-as-timeseries.png" />

## Show & hide columns

For a more compact view of your data, you can hide columns that are not always relevant and show them only when needed. You can do this by clicking on the column name in the database header and selecting **Hide in block.**

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/database-hide-in-block.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=56016afafab1a0495e0462e6fcc3b180" alt="" width="1752" height="1188" data-path="images/database-hide-in-block.png" />

Another way is to click the **Customize** button in the top-right corner of the database, go to **Properties,** and toggle columns on or off by clicking the **eye icon.**

## Adding a row

If you need to manually add a row to a database—for example, a new **vendor** in an **Income Statement by Vendor** database or a new **assumption** in an **assumptions** database—click **+ Add item.**

After adding the row, set values for the **dimensions** used in the **Segment by** for this database.

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/database-add-row.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=e769f040667705b6c92a29d8e5b81bf1" alt="" width="2804" height="1700" data-path="images/database-add-row.png" />

**Important:** Segmentation determines the **granularity** of your database. Each row should have a **unique combination** of dimension values.

* If a row does **not** have a unique combination, you’ll see a **warning** next to it.
* This means the row is **linked** to other rows sharing the same segmentation. Any changes made to one of these rows will automatically update the others.

<Note>
  For HRIS databases, the process of adding a row is different. Please follow the steps [here](https://docs.runway.com/concepts/drivers/drivers-basics#driver-types).
</Note>

## Deleting a column

To delete a column from a database, the process depends on how the column was added.

**For columns coming from the database configuration** – Remove the column from the relevant section in the configuration (Driver, Segment by, or Other Columns). This ensures the column does not reappear after the next integration sync or configuration refresh.

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/database-remove-from-config.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=91f41bf97943e612d919a76b0932a99d" alt="" width="2452" height="1334" data-path="images/database-remove-from-config.png" />

**For manually added columns** – Click on the column header and select **Delete property.** If the column is being used elsewhere in your model, you will be asked to confirm the action, as deleting it could cause errors in places where it is referenced.

<img src="https://mintcdn.com/runway-5055a12e/vafQYSeDpH6RaQ2G/images/database-delete-property.png?fit=max&auto=format&n=vafQYSeDpH6RaQ2G&q=85&s=e6292c042ae420fc0d15d85c0a7986c1" alt="" width="2452" height="1334" data-path="images/database-delete-property.png" />

## Deleting a row

To delete a row from a database, **right-click** on the row and select **Delete row.**

<Warning>
  Deleting a row removes it from the database, but it **does not delete the drivers** connected to that row. Any formulas relying on those drivers will remain unchanged, and the drivers will still be accounted for. These drivers will appear in your **Unlisted drivers** page.
</Warning>

To fully delete a driver and eliminate its impact on formulas, you need to delete it from the **Unlisted drivers** page.

<img src="https://mintcdn.com/runway-5055a12e/wYNFXrpTLTSnjdee/images/unlisted.png?fit=max&auto=format&n=wYNFXrpTLTSnjdee&q=85&s=ecd03761ca3d8e4ff8697a84e6d1ed48" alt="" width="1618" height="1426" data-path="images/unlisted.png" />
