Skip to content

Introduction

linaldb is a high-performance, in-memory analytical engine that bridges relational data engineering and scientific computing. It provides a SQL-inspired query language (LINAL Script, .lnl files) where vectors, matrices, and multi-dimensional tensors are first-class column types, not a bolted-on extension.

If your workflow currently looks like SQL database → export → numpy/pandas → separate vector index, linaldb collapses that into one engine and one query language.

  • Hybrid tables. Scalar columns (Int, String, Double, …) alongside native Vector(n) / Matrix(r, c) columns, in the same dataset.
  • Vector math inside SQL. COSINE_SIM, DOT, NORMALIZE, MATMUL, DISTANCE and more work directly inside SELECT, WHERE, and ORDER BY: no separate vector query language, no round-trip through a client library.
  • Vector aggregates. AVG_VEC/SUM_VEC compute per-group centroids or sums in a single GROUP BY query.
  • Classical linear algebra, natively. INVERSE, SOLVE, EIGEN, QR, LU, SVD, PCA: real matrix decompositions in the DSL, built on nalgebra, erroring loudly instead of silently returning NaN on a singular or non-symmetric input.
  • Index-accelerated similarity search. CREATE VECTOR INDEX + SEARCH for top-k nearest-neighbor retrieval at scale (IVF-style clustering kicks in automatically past ~64 rows).
  • Real, persisted lineage. Every tensor op and dataset transformation is recorded into a restart-surviving provenance log, inspectable with EXPLAIN LINEAGE, not just an in-session debugging aid.
  • Frequency-domain signal processing. FFT/PSD/WHITEN/BANDPASS/ MATCHED_FILTER for real time-series/sensor work.
  • CLI / REPL. A single self-contained binary (linal), used embedded like SQLite.
  • HTTP server. linal serve exposes /execute, /delivery (Parquet export), /jobs, /schedule, with multi-tenant isolation via an X-Linal-Database header and an OpenAPI/Swagger UI.
  • Python. Either pip install linaldb (embedded native bindings, in-process, no server) or pip install linaldb-server (a thin HTTP client against linal serve).
  • R. The same two shapes, as R packages.
  • New to linaldb? Start with Installation, then the Quickstart for a real, runnable first session.
  • Already comfortable and want the full language? Jump straight to the DSL Reference.
  • Want to see it solve a real problem before committing? Browse Use Cases or try the Playground directly in your browser.

linaldb is licensed under the LinalDB Community License v1.0: free for personal use, research, education, and internal organizational use. Commercial redistribution or managed-service (DBaaS/SaaS) offerings require a separate commercial license; contact develop@gorigami.xyz.