# 📊Record Managers

When document chunks are upserting, each chunk will be hashed using [SHA-1](https://github.com/emn178/js-sha1) algorithm. These hashes will get stored in Record Manager. If there is an existing hash, the embedding and upserting process will be skipped.

In some cases, you might want to delete existing documents that are derived from the same sources as the new documents being indexed. For that, there are 3 cleanup modes for Record Manager:

<figure><img src="https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2FpF2lrgB4I1p4OFUHgKsh%2Fimage.png?alt=media&#x26;token=d397dc4b-02bf-4faa-8ab8-884915bc2da5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2FpkvfkExrnjYLJRDuBFOm%2Fimage.png?alt=media&#x26;token=1de3816b-6e24-4756-96a2-5cfa2e217448" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2FriaP4458NSWVm1dKZCy6%2Fimage.png?alt=media&#x26;token=0fec2b3a-ab7f-4f46-af08-e2b892d07a7c" alt=""><figcaption></figcaption></figure>

2. And have the following 2 documents:

<figure><img src="https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2F65iafha1RWvhLukhLkq5%2Fimage.png?alt=media&#x26;token=4cfb1292-e0b9-4a58-8989-e84ac766f4dd" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2FzWbnZqf7C4uV5bpwfJgB%2Fimage.png?alt=media&#x26;token=f25906c0-e4f2-4236-88b2-9ed9875d5d46" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2Fy0jezedbLkTrBwBQxGig%2Fimage.png?alt=media&#x26;token=2d275b76-e935-44a9-b6ab-af3e7beea920" alt=""><figcaption></figcaption></figure>

3. After an upsert, we will see 2 documents that are upserted:

<figure><img src="https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2FdwoZ7Hm9nlGfk2xxETaj%2Fimage.png?alt=media&#x26;token=6198f338-d52e-47ba-b8c6-30ae50149f34" alt=""><figcaption></figcaption></figure>

4.Now, if we delete the **Dog** document, and update **Cat** to **Cats**, we will now see the following:

![](https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2F5A2moNMuvIFCFb0OBG6x%2Fimage.png?alt=media\&token=0aaeabb6-4b78-4f15-81a1-2ebfc73495c1)

·       The original **Cat** document is deleted

·       A new document with **Cats** is added

·       **Dog** document is left untouched

·       The remaining vector embeddings in Vector Store are **Cats** and **Dog**

<figure><img src="https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2FE7EDWqNThtHpBXFXrD8v%2Fimage.png?alt=media&#x26;token=a53475dc-cdd7-44e2-be82-6415a827dabe" alt=""><figcaption></figcaption></figure>

Current available Record Managers are:

·       SQLite Record manager

·       MySQL Record manager

·       PostgresQL Record manager

&#x20;

#### 1)SQLite Record manager

The SQLite Record Manager stores records locally using SQLite database.

#### Key Features:

• Local Storage: Stores data on local system\
• Lightweight: No server required\
• Easy Setup: Minimal configuration needed\
• Fast Access: Suitable for small applications

#### Setup Requirements:

1. Add SQLite Record Manager node to the canvas
2. Configure Additional Parameters if required

#### Use Cases:

• Local development\
• Small-scale applications

<figure><img src="https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2Fe5nE9HQ9HC5mVtrO2SGI%2Fimage.png?alt=media&#x26;token=b51f83b1-2397-4932-a4a5-36dec833ca7e" alt=""><figcaption></figcaption></figure>

#### 2)MySQL Record manager

The MySQL Record Manager stores and manages records using a MySQL database.

#### Key Features:

• Database Storage: Stores records in MySQL\
• Persistent Data: Retains data across sessions\
• Structured Storage: Uses relational database format\
• Scalable: Suitable for production applications

#### Setup Requirements:

1. Set up a MySQL database
2. Add MySQL Record Manager node to the canvas
3. Connect Credential > provide MySQL credentials
4. Enter Host, Database, and Port (default: 3306)
5. Configure Additional Parameters if required

#### Use Cases:

• Storing application data\
• Managing structured records in workflows

<figure><img src="https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2FgVPtbjxEMQlbIfFB3sE1%2FScreenshot%202024-07-09%20104811.png?alt=media&#x26;token=3d699cf3-074c-42e7-a327-2995cf918de2" alt=""><figcaption></figcaption></figure>

#### 3)PostgresQL Record manage

The Postgres Record Manager stores and manages records using a PostgreSQL database.

#### Key Features:

• Reliable Storage: Uses PostgreSQL database\
• Persistent Records: Maintains data across sessions\
• High Performance: Efficient for large datasets\
• Flexible Queries: Supports advanced querying

#### Setup Requirements:

1. Set up a PostgreSQL database
2. Add Postgres Record Manager node to the canvas
3. Connect Credential > provide PostgreSQL credentials
4. Enter Host, Database, and Port (default: 5432)
5. Configure Additional Parameters if required

#### Use Cases:

• Backend data storage\
• Large-scale applications

<figure><img src="https://1720595571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxWXmt1Z68dgle5JORrEw%2Fuploads%2FEs8yyXwWdvUSYQbTUNyZ%2FScreenshot%202024-07-09%20104825.png?alt=media&#x26;token=b2a9e754-54ea-4675-804f-e0c5ea49ebfc" alt=""><figcaption></figcaption></figure>
