# Overview

## Initialize

{% hint style="info" %}
You can initialize as many databases as you want
{% endhint %}

{% tabs %}
{% tab title="Commonjs" %}
{% code lineNumbers="true" %}

```javascript
const Dubnium = require('dubnium') 
const db = new Dubnium('dirPath','ext', useConfig)
```

{% endcode %}
{% endtab %}

{% tab title="ECMAScript" %}
{% code lineNumbers="true" %}

```javascript
import Dubnium from 'dubnium'
new Dubnium('dirPath','ext')
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Make your first Record

{% code lineNumbers="true" %}

```javascript
db.create('tag', content)
```

{% endcode %}

## Get a Record

{% tabs %}
{% tab title="From Tag" %}
{% code lineNumbers="true" %}

```javascript
db.get('tag')
```

{% endcode %}
{% endtab %}

{% tab title="From value" %}
{% code lineNumbers="true" %}

```javascript
db.getFromValue('key','value',returnType) //JSON Only
```

{% endcode %}

`returnType` info can be found [here](/2/miscellaneous.md#returntype)
{% endtab %}

{% tab title="All" %}
{% code lineNumbers="true" %}

```javascript
db.getAll(returnType)
```

{% endcode %}

`returnType` info can be found [here](/2/miscellaneous.md#returntype)
{% endtab %}
{% endtabs %}

## Delete a Record

{% code lineNumbers="true" %}

```javascript
db.get('tag').delete()
```

{% endcode %}

## Modify a Record

{% tabs %}
{% tab title="Data (JSON only)" %}
{% code lineNumbers="true" %}

```javascript
db.get('tag').setValue("key","new value")
```

{% endcode %}

For non-JSON, use [`overwrite()`](/2/modify.md#overwrite)
{% endtab %}

{% tab title="Tag" %}
{% code lineNumbers="true" %}

```javascript
db.get("old_tag").setTag("new_tag")
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Check out our full docs for more API methods and in-depth explanations.


---

# 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://db.coolstone.dev/2/overview.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.
