# DianaDB > DianaDB is the first fully featured DBMS written in Node.js — a column-oriented NoSQL database in TypeScript. It stores documents in a columnar format where every field acts as an index. It supports schema-enforced collections, spatial and time-based queries, cross-database lookups, materialized views that update on the fly, ACID transactions with document-level locking, change subscriptions, migrations, TLS/mTLS, and S3-compatible backup storage. DianaDB is authored and maintained by Data Bikers Limited (Hong Kong). It is conceptually close to MongoDB — the query language is similar to MQL — but architecturally distinct: columnar storage, mandatory document schemas, and a TypeScript-native ODM. Current release: Server v3.0.0 / ODM v3.0.0. Server 3.0.0 requires ODM >= 3.0.0 for subscriptions (ODM 3.0.0 also works with older servers, so upgrade the ODM first). ## Server - [Install and Run DianaDB Server](https://diana-db.com/server/linux): Debian and Alpine install, the `diana-db` CLI (start/stop, user, access and backup management), the full config-file / environment-variable reference including TLS, S3 storage and write-ahead log keys, and how snapshots and the write-ahead log keep acknowledged writes durable - [DianaDB & Docker](https://diana-db.com/server/docker): Debian and Alpine Dockerfiles, entrypoint scripts, `docker run`, and Docker Compose - [Security](https://diana-db.com/security): TLS/mTLS, AES-256-GCM request encryption with a password-derived key (the password is never transmitted), per-user per-database access levels (1 read, 2 write, 3 manage) and what each allows, token-authenticated subscribers, derived-key user storage, and private S3 storage ## Desktop Application - [DianaDB Desktop Application](https://diana-db.com/desktop/gui): cross-platform GUI for browsing and managing data, editing schemas and relationships, inspecting materialized views, and testing queries. Linux (AppImage) and Windows builds, currently v1.1.2 ## ODM (Node.js client) - [DianaDB ODM for Node.js](https://diana-db.com/odm/overview): installation, `DianaDb` constructor options (object form and `diana-db://` / `diana-dbs://` connection string), connection and reconnect behaviour, and every client method — connect/disconnect, subscribe/unsubscribe, migrations, transactions, database and collection management, schema reading and locking, views, health, version - [Schema and Types](https://diana-db.com/odm/schema): document schema definition, all field options (`type`, `required`, `unique`, `mutable`, `lowercase`, `uppercase`, `default`, `get`, `set`, `items`, `reference`, `triggerRemove`, `ttl`, `precision`) with their mutual exclusions (`precision` is optional since 3.0.0), and all eight field types (STRING, NUMBER, BOOLEAN, POSITION, OBJECT_ID, REFERENCE, TIME, ARRAY) - [Model](https://diana-db.com/odm/model): the `Model` class, its options (including `dianaDb`), and its methods — `init`, `insert`, `find`, `count`, `update`, `remove`, `distinct`, `max`, `min`, `createView`, `removeView`, `getViews`, `findByView`, `countByView`, `lock`, `unlock` - [Find and Count Documents](https://diana-db.com/odm/model/find): find/count arguments, every query operand (comparison, string, TIME parts, spatial, reference sub-queries), transform pipelines (`$project`, `$group`, `$match`, `$lookup`, `$unwind`, `$replaceRoot`, `$sort`, `$skip`, `$limit`), projection operands, and `distinct` / `max` / `min` - [Insert Documents](https://diana-db.com/odm/model/insert): `insert` usage and the returned document shape - [Update Documents](https://diana-db.com/odm/model/update): `update` usage and the string, number, array and TIME update operators, with the `UnitOfTime` and `Weekday` enums - [Remove Documents](https://diana-db.com/odm/model/remove): `remove` usage - [Materialized Views](https://diana-db.com/odm/model/views): `createView`, `removeView`, `getViews`, `findByView`, `countByView` — views update automatically when the underlying data changes (per document for map-only pipelines, throttled rebuild otherwise) and support cross-database lookups - [Subscribers](https://diana-db.com/odm/subscribe): subscribing and unsubscribing to database or collection changes, the `DatabaseUpdate` contract, and the subscriber token handshake - [ACID Transactions](https://diana-db.com/odm/transactions): `startTransaction`, `commitTransaction`, `rollbackTransaction`, document-level locking, auto-rollback limits - [Migrations](https://diana-db.com/odm/migrations): `addMigration`, `migrateUp(database?)`, `migrateDown(database?, steps?)`, `getMigrations`, the `MigrationInfo` result - [Errors](https://diana-db.com/odm/errors): error `code` values — `SERVER`, `DURABILITY`, `TIMEOUT`, `CONNECTION` — and whether the change was applied ## Cook Book - [Example: A Mini Shop](https://diana-db.com/cookbook/shop-example): end-to-end example over seven collections (`user`, `userLocation`, `item`, `price`, `storeItem`, `order`, `transaction`) with seven materialized views — current price, reserved-aware inventory, three-way balance (actual, pending deposits, pending withdrawals), and `orderToPay` / `orderToShip` built from user and location lookups — plus seeding and an order flow that reserves stock inside an ACID transaction ## Testing - [Comparative Benchmark](https://diana-db.com/benchmark): DianaDB compared with MongoDB and PostgreSQL on inserts and queries - [Benchmark source](https://github.com/databikers/db-benchmark): the benchmark suite, runnable with Docker Compose ## Project - [Changelog](https://diana-db.com/changes-log): release history with paired server and ODM version tags - [Announced Features](https://diana-db.com/announced-features): roadmap — desktop management tool, DiQL improvements, Golang/PHP/C#/Java clients, vectors and similarity search, multi-server replication - [Issue Reporting](https://diana-db.com/issue-reporting): GitHub Issues - [License](https://diana-db.com/license): MIT with a usage restriction — may not be used to create or offer a competing product or service without written consent from Data Bikers Limited - [npm](https://www.npmjs.com/package/@diana-db/odm): the ODM package - [GitHub](https://github.com/databikers/diana-db): source and issues - [Data Bikers Limited](https://databikers.com): the company behind DianaDB