---
title: Build applications
description: Build applications backed by Lakebase Postgres. Databricks Apps with managed connections, or external apps using SDK, API, or Data API.
canonical_url: https://docs.databricks.com/gcp/en/oltp/projects/build-applications
---

# Build applications

Lakebase gives your application a serverless Postgres database with native Databricks integration. Use [Databricks Apps](https://docs.databricks.com/gcp/en/oltp/projects/databricks-apps.md) (recommended) for managed identity, automatic credentials, and built-in deployment. Use external applications when you must run in existing infrastructure or with a specific runtime outside Databricks.

## <a id="options" />Pick where your app runs

| Approach                                                                                                          | Description                                                                                                                  |
| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [Databricks Apps](https://docs.databricks.com/gcp/en/oltp/projects/databricks-apps.md)                            | **Recommended.** The platform manages credentials and deployment. Best for new apps, dashboards, and internal tools.         |
| [Manual OAuth tutorial](https://docs.databricks.com/gcp/en/oltp/projects/tutorial-databricks-apps-autoscaling.md) | Use when you need explicit control over OAuth token rotation, or your app code already manages its own connection lifecycle. |
| [External apps with SDK](https://docs.databricks.com/gcp/en/oltp/projects/external-apps-connect.md)               | Use when your app runs outside Databricks in Python, Java, or Go. SDK handles workspace token rotation.                      |
| [External apps with API](https://docs.databricks.com/gcp/en/oltp/projects/external-apps-manual-api.md)            | Use when your app runs outside Databricks in Node.js, Ruby, PHP, or any other language. You manage token rotation yourself.  |

## <a id="when-to-use-apps-vs-external" />Databricks Apps vs external applications

| **Aspect**         | **Databricks Apps**                                                      | **External applications**                                                    |
| ------------------ | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------- |
| **Deployment**     | Runs on Databricks platform                                              | Runs on external infrastructure                                              |
| **Identity**       | Platform provides app service principal automatically                    | Create and manage service principal manually                                 |
| **Setup**          | Create Postgres role; configure connection in app.yaml                   | Create service principal, Postgres role, and configure connection parameters |
| **Authentication** | WorkspaceClient uses app identity automatically (no credentials in code) | WorkspaceClient requires explicit service principal credentials              |
| **Best for**       | New apps, rapid prototyping, internal tools                              | Existing infrastructure, specific frameworks, systems outside Databricks     |

## <a id="lightweight" />Lightweight data access

If your application doesn't need a full server, the [Data API](https://docs.databricks.com/gcp/en/oltp/projects/data-api.md) exposes your Postgres tables as REST endpoints. This works for serverless functions, mobile apps, or environments without a Postgres driver.
