# TyDB

![](/files/-M5x4DbL79NDygS-rJFE)

## Introduction

TyDB is a database system written in typescript, its goal is to provide a strongly-typed database experience with an API and a query language similar to MongoDB.

* It can be in-memory, or persistent (using a persistence adapter).
* It can be used with NodeJS or in the browser.
* It can be embedded or served over a network (like MongoDB).
* The query language and the API is very similar to MongoDB, (except for the dot notation) and the difference is only to provide and experience with maximum type declaration.
* Persisted in a flat file when in node (using a persistence adapter), persisted in IndexedDB when in the browser (using another adapter), and you can easily write your own adapter too.
* Can deal with large data sets (tested against 1GB of data) and won't take too much memory.
* It is fast.
* It is light-weight (45 KB, not gzipped).
* Based on NeDB.

![Different ways of instantiating the database](/files/-M676op4rh2RPaqQOiV5)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://alex-corvi.gitbook.io/tydb/undefined.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
