SQL Database

Serverless distributed SQL with built-in vector search

Store and query relational data and embeddings from global replicas for AI-powered applications.

Data in your apps

Build applications that store and access structured data natively, without external databases.

Fast global reads

Serve data to users worldwide with quick response times from distributed replicas.

RAG without complexity

Build AI applications with embeddings and relational data in a single database.

Build databases from code

Create, query, and manage SQLite-compatible databases from your application workflow. Connect SQL Database with Functions to build data-driven experiences on Azion Web Platform.

SQL Database code workflow with CLI and API integration.

Distributed SQL for resilient global reads

The primary instance handles writes while distributed replicas serve read-heavy workloads closer to users, helping applications stay responsive and available.

Interface representing an example of a custom query.

Combine relational data and vector search

SQL Database stores structured records and embeddings together, so teams can build RAG applications without adding a separate vector database.

sql-database.ts
01import { createDatabase } from 'azion/sql';
02import type { AzionDatabase, AzionDatabaseResponse } from 'azion/sql';
03
04const { data: database, error }: AzionDatabaseResponse<AzionDatabase> =
05 await createDatabase('app-data', { debug: true });
06
07if (error || !database) {
08 throw new Error(error?.message ?? 'Failed to create database');
09}
10
11await database.execute([
12 'CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)',
13 "INSERT INTO users (name, email) VALUES ('Alice', 'alice@example.com')"
14]);
15
16const { data: users } = await database.query([
17 'SELECT * FROM users'
18]);
19
20console.log(users?.rows);

See how to use

AI

Retrieval-Augmented Generation (RAG)

Build RAG applications with built-in vector search and AI Inference integration. Query embeddings and relational data together without a separate vector database.

Security

Authentication and sessions

Store sessions, tokens, and authentication metadata in a distributed SQL layer. Validate credentials from replicas closer to users.

SaaS

Global replication for SaaS

Serve shared datasets from distributed read replicas. SaaS applications stay consistent for users across regions.

Personalization

User profiles and preferences

Store profiles and settings close to application logic for responsive personalization. Read-heavy workloads benefit from distributed replicas.

E-commerce

E-commerce product catalogs

Query inventory and product data from replicas near customers. Keep catalog experiences responsive during traffic spikes.

HeroSpark
Azion transformed our operations, reducing costs and improving performance while freeing 200+ monthly hours for strategic development.
Mateus LeonardiCTO at HeroSpark

A full-stack platform that scales instantly

Frequently Asked Questions

//Store

Your data.Available everywhere.

Get faster access, simpler scaling, and less storage overhead as data grows.