# Non-Relational Database

A database that stores data in flexible formats e.g., documents, key-value pairs, or graphs, making it ideal for unstructured or large-scale data. (Examples include MongoDB, Cassandra, and Redis.)

{% hint style="info" %}
**Note:** The example below uses a Non-Relational Database with **MongoDB**. You can follow the same process for other supported databases.
{% endhint %}

## Example

The database contains 21,349 movie entries. From this dataset, movies belonging to the genres Animation, Comedy and Family will be filtered. The cast details of the first two filtered entries will then be validated using dynamic variables storing the values Walt Disney and Clarence Nash. After successful validation, the complete filtered dataset is exported to an Excel sheet.

### The following actions are used in this example.

* Get Data (DB)
* Export Data (DB)

### Test Step Group1: Filter Movies by Genre

**Step1**: The **Get Data (DB)** action fetches the query result using the input value of Get Data action and stores the resulting data into a variable called **{DB\_Data}**.

<figure><img src="/files/r5KFYgnnU1wnQNgZKs3H" alt=""><figcaption></figcaption></figure>

### Test Step Group2: Verify Cast Names in First Two Entries

**Step1**: **Create Dynamic Variable** action creates Dynamic variable named **{movie1}** which will contain cast data as **Walt Density** for verification with filter first two entries.

**Step2**: **Create Dynamic Variable** action creates dynamic variable named **{movie2}** which will contain cast data as **Clarence Nash** for verification with filter first two entries.

**Step3**: The **Display Variable Value** action displays the value located at the first row and third column of the **{DB\_Data}** (from 1<sup>st</sup> Test Step Group) matrix using **{DB\_Data\[1]\[3]}**. &#x20;

**Step4**: The **Display Variable Value** action displays the value located at the second row and third column of the **{DB\_Data}** (from 1<sup>st</sup> Test Step Group) matrix using **{DB\_Data\[2]\[3]}**. &#x20;

**Step 5**: The **Compare Value** action will compare the data retrieved from **{DB\_Data\[1]\[3]}** with the dynamically created data that will be stored in **{movie1}**, and result will store it in output variable **{Status1}**.

**Step 6**: The **Compare Value** action will compare the data retrieved from **{DB\_Data\[2]\[3]}** with the dynamically created data that will be stored in **{movie2}**, and result will store it in output variable **{Status2}**.

**Step 7:** The **Display Variable Value** action will display the status of the comparison result, stored in the output variable **{Status1}**, which will contain either **true** (if both value match) or **false** (if both values do not match).

**Step 8**: The **Display Variable Value** action will display the status of the comparison result, stored in the output variable **{Status2}**, which will contain either **true** (if both value match) or **false** (if both values do not match).

<figure><img src="/files/FEohLIQeLBE84UFDn0cZ" alt=""><figcaption></figcaption></figure>

### Test Step Group3: Export Filtered Data

**Step 1**: **Create File** action helps to create file in system, the user needs to provide the file path where the Excel file should be created on the system.   \
**Step 2**: The **Export Data (DB)** action exports the filtered database result into an Excel file, and the output is written to the Excel file path defined in the previous step.&#x20;


---

# 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://docs.avoautomation.com/avo-assure/avo-assure-supported-technologies-for-automation/database-automation/non-relational-database.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.
