---
title: SQLDB - Serverless SQL Databases for Edge Compute | Telnyx
canonical: https://telnyx.com/products/sqldb
---
# SQLDB - Serverless SQL Databases for Edge Compute | Telnyx

[View as page](https://telnyx.com/products/sqldb)

**EDGE COMPUTE**

# SQLDB

Create a SQLite database, bind it in your config, query it from your functions. No database server to manage, no infrastructure to provision. Just SQL.

[Start Building](https://telnyx.com/sign-up)[CONTACT US](https://telnyx.com/contact-us)

WHY TELNYX

## Build on one platform, not a stack of vendors.

Compute, storage, database, inference, and telecom on one account, one API, one bill. SQLDB is the relational data layer, connected through bindings, not API calls.

* ### One platform, one bill  
Functions, KV, CloudFS, Object Storage, and Inference on a single account. SQLDB is the relational data layer. No external database vendor in the path.
* ### One runtime, no glue code  
Query SQLDB, read from CloudFS, call inference, and send a message through the telecom API in the same request. No SDK per service, no glue code between layers.
* ### Built for real-time agents  
Agents that need to call models, store state, and query data in real time. SQLDB gives them a relational database through a binding, no connection string, no network hop.

FEATURES

## SQL without the database server

Create a database in one command. Bind it in your config. Query it from TypeScript or from the CLI. No provisioning, no sizing, no connection pool to manage.

* Zero-credential edge access  
Your functions reach SQLDB directly through a typed env binding. No connection string, no network hop, no API key. The database is available the moment your function runs.
* REST API and CLI  
Query any database from the terminal or over HTTP without deploying a function. Create databases, apply migrations, inspect data, run backfills. Same data, no deploy cycle.
* SQLite you already know  
Full SQLite query surface. SELECT, JOIN, aggregate, GROUP BY, secondary indexes. If you know SQL, you know SQLDB. No proprietary query language, no dialect to learn.
* Shared by every function that binds it  
One database, many functions. Create it once, bind it by id, and every function that needs the data can query it. A row written by one function is visible to the next request from any other.
* Schema before code  
Create a database, apply schema from the CLI, then ship a function that binds it. Your schema exists before any code runs. Migrations are versioned and applied from the terminal.
* Colocated with compute and inference  
Your database runs on the same infrastructure as your functions and your models. No cross-provider latency. No egress fee for querying your own data. No failure boundary between your code and your database.

HOW IT WORKS

## Query in three steps

Create a database from the CLI, bind it in your config, and query it from your function through a typed env binding. No server to size, no connection pool to manage.

[Read the docs](https://developers.telnyx.com/docs/edge-compute/sqldb)

Create a database

```
telnyx-edge storage sqldb create --name my-app-db

telnyx-edge storage sqldb execute <database_id> --remote \
  --command "CREATE TABLE links (
    id INTEGER PRIMARY KEY,
    slug TEXT NOT NULL UNIQUE,
    target TEXT NOT NULL
  )"
```

Bind it in your config

```
# telnyx.toml
[storage.sqldb.DB]
id = "<database_id>"
```

Query from your function

```
import { env } from "@telnyx/edge-runtime";

export default {
  async fetch(req: Request): Promise<Response> {
    const link = await env.DB
      .prepare("SELECT * FROM links WHERE slug = ?")
      .bind("docs")
      .first();

    return Response.json(link);
  },
};
```

Create a databaseBind it in your configQuery from your function

BINDINGS

## What SQLDB connects to on the platform.

SQLDB is the relational data layer for Edge Compute. Every function that binds a database can query it through env with zero credentials. The CLI and REST API reach the same data without deploying anything.

* [![Functions hero visual](https://us-central-1.telnyxcloudstorage.com/aimarketingmaterials/Product-Hero_Functions_2x---aafa44a8-5b26-4d84-902b-9059dc6a0db7.png)FunctionsEdge functions query SQLDB through a typed env binding. No connection string, no network hop. Run SELECT, INSERT, UPDATE, and JOIN from inside any function that binds the database.](https://telnyx.com/products/functions)
* [![Stateful Actors hero visual](https://us-central-1.telnyxcloudstorage.com/aimarketingmaterials/statefulactor_hero---a8760bd3-f66c-428c-ab25-e2887f4990e8.png)Stateful ActorsActors have their own embedded SQLite at ctx.storage.sql for per-instance state. SQLDB is the shared layer: one database, many functions, queryable from the CLI. Use SQLDB for application data that more than one caller needs to read.](https://telnyx.com/products/stateful-actors)
* [![KV hero visual](https://us-central-1.telnyxcloudstorage.com/aimarketingmaterials/Product-Hero_KV_2x---64d8f025-9e01-414c-b528-9197da9832bb.png)KVUse KV for read-heavy lookups, session data, and cached responses. Use SQLDB for relational data: catalogs, accounts, links, transactional records. Both are reachable from functions through bindings.](https://telnyx.com/products/kv)
* [![Inference hero visual](https://d2efw2akbx8gaf.cloudfront.net/https://dotcom-payload-assets-prod.s3.us-east-1.amazonaws.com/cms-media/LLM_Hero_16x9@2x.webp?width=1120&format=webp)InferencePull embeddings, context windows, or prompt templates from SQLDB and pass them to the inference binding. Your data layer and your model serving are on the same infrastructure. No cross-provider hop between query and inference.](https://telnyx.com/products/inference)

## Sign up and start building.

Get an API key, create a database, and run your first query in minutes.

[SIGN UP](https://telnyx.com/sign-up)[TALK TO US](https://telnyx.com/contact-us)

## Sign up and start building.

Get an API key, create a database, and run your first query in minutes.

[SIGN UP](https://telnyx.com/sign-up)[TALK TO US](https://telnyx.com/contact-us)

## FAQ

### What is Telnyx SQLDB?

SQLDB is a serverless SQLite database for Edge Compute. Create a database, bind it by id in your config, and query it from any function through a typed env binding. No database server to manage, no connection pool to size, no infrastructure to provision.

### How is SQLDB different from a managed database?

Most managed databases are a separate service from a separate vendor. Your function makes a network call, handles a connection string, and pays egress for every query. SQLDB runs on the same infrastructure as your functions. Queries go through a binding, not over the internet. No credentials, no hop, no egress.

### How is SQLDB different from per-actor SQL?

Stateful Actors have their own embedded SQLite at ctx.storage.sql, private to that actor instance. SQLDB is a shared database: one database, many functions, queryable from the CLI and REST API. Use SQLDB for application data that more than one caller reads. Use actor SQL for state owned by a single entity.

### Can I use SQLDB without edge functions?

Yes. The CLI and REST API can query any SQLDB database without deploying a function. Create databases, apply schema migrations, run SELECT statements, and do backfills from the terminal. The REST API accepts a bearer token and runs SQL you write yourself.

### What SQL features are supported?

Full SQLite query surface. SELECT, JOIN, aggregate, GROUP BY, secondary indexes, prepared statements with parameter binding. If it works in SQLite, it works in SQLDB. Explicit BEGIN is not supported; the runtime owns transaction boundaries.

### How do I manage schema?

Schema lives before code does. Create a database from the CLI, apply migrations with telnyx-edge storage sqldb migrations, then ship a function that binds it. Migrations are versioned and applied from the terminal, so your schema can exist before any function runs.

### Is SQLDB production-ready?

SQLDB is in beta. The API surface and behavior may still change as it moves toward general availability. Every database has a single primary, so writes serialize and there is no replica lag to reason about.

### How much does SQLDB cost?

Pricing is based on storage and queries. You pay for the storage your databases consume and the queries you run. No instance sizing, no compute allocation, no idle fees. Check the pricing page for current rates.

[Start building](https://telnyx.com/sign-up)