KDB knowledge

KDB knowledge

Documentation of KDB (KARELA DataBase) for people and for AI assistants (web site: https://amritshr.github.io/kdb-knowledge/): 120 help topics, 25 tutorial chapters and 2292 examples. Every example ran on kdb 0.2.0-dev when this was built (2026-10-22), and its real result is written under it.

KDB is a SQL database for time-series and relational data, made by Amrit Shrestha. One program serves an HTTP/JSON API and a web console (port 9900) and the PostgreSQL wire protocol (port 8832). It is not kdb+/q.

This repository holds documents and AI skills only. It has no source code of KDB.

Give it to an AI

AIWhat to do
Any chat assistant that opens links (ChatGPT, Claude, Gemini, Copilot, Perplexity, ...)Give it this link: https://raw.githubusercontent.com/Amritshr/kdb-knowledge/main/llms.txt and ask it to read the topics it needs. For a custom GPT, Gem or Project, paste ai/system-prompt.md into its instructions.
Claude Code, Claude.ai, Claude DesktopCopy skills/kdb/ (and skills/kdb-geometry/) into ~/.claude/skills/ or your project's .claude/skills/, or upload the folder as a skill in Claude.ai. A KDB server can also write it: kdb skill install.
OpenAI Codex, Cursor, Windsurf, Zed, Aider, Jules and other agentsCopy ai/AGENTS.md into your project (as AGENTS.md). Tools that read Agent Skills can use skills/ as it is.
Gemini CLICopy ai/GEMINI.md into your project.
GitHub CopilotCopy ai/.github/copilot-instructions.md into your project's .github/.
Cursor rulesCopy ai/.cursor/rules/kdb.mdc into your project's .cursor/rules/.
RAG, embeddings, your own toolsllms-full.txt is everything in one file; index.json lists every topic and part; docs/ has one file per topic.

What is here

PathWhat it is
llms.txtthe index for AIs: one line per topic, by category (llmstxt.org)
docs/one markdown file per help topic
tutorial/the tutorial, chapter by chapter
fixtures/the sample tables the examples load first
skills/the Agent Skills (SKILL.md)
ai/the same knowledge as AGENTS.md, GEMINI.md, Copilot and Cursor rules, and a system prompt

Start reading

Made from the KDB help, which is also served by every KDB server at /help. Do not edit these files here: they are built again from the help on each release.

Copyright (c) 2026 Amrit Shrestha. See NOTICE.md.

All topics

Getting started

Tutorial

Databases & folders

Tables

Constraints

Writing data

Querying

Time-series

Functions — math

Functions — text

Functions — date and time

Functions — conditional and NULL

Functions — conversion

Functions — aggregate

Functions — window and series

Functions — technical indicators

Functions — statistics

Functions — JSON and bytes

Functions — security

Views

Saved functions

Stored procedures

Triggers

Transactions

Cursors

Users & security

Backup, check, repair, restore

Command line

HTTP API

Postgres protocol

C API

Web console

Geometry & CAD

Performance tips

Limits

Quality

Data formats