# Prerequisite for Data examples

In order to make the usage examples of various Data blocks clear and easy to understand, we have created a common background or scenario, which we will explain in this section.

## Introduction Video

The following video serves as a great introduction to databases and also provides a general overview of data features in your Zingy app.

{% embed url="<https://youtu.be/3h_bRxORBlY>" %}
Video: Database Features
{% endembed %}

## Table Information

We will continue to use the example *Customers* [Database Table](/app-editor/data/database-tables.md) presented in the above video and also detailed below:

<div align="left"><figure><img src="/files/HwMDdhAyZaoNjUPonlOI" alt="" width="563"><figcaption><p>Example Database Table about Customers</p></figcaption></figure></div>

## Sample Records

We will use the following sample records for the *Customers* [Database Table](/app-editor/data/database-tables.md).&#x20;

<figure><img src="/files/I4ZpDp8PtySUHoewwZGn" alt=""><figcaption><p>Example records for the Customers table</p></figcaption></figure>

## Sample Queries

The following [queries](/app-editor/data/database-queries.md) are part of the *Customers* [Database Table](/app-editor/data/database-tables.md).&#x20;

* NameMatch

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

  This query will list records where either the value of the *FirstName* *OR* the *LastName* fields, contains the text specified in the Input-1 parameter.&#x20;
* NamePhoneMatch

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

  This query will list records where the *PhoneNumber* field contains the text specified in the Input-2 parameter *AND* either of the *FirstName* or the *LastName* fields, contains the text specified in the Input-1 parameter.&#x20;

## Database Reading Logic for examples

For Page Flow/Cloud Flow blocks that are related to reading of database records, the following base logic is used:

* The [Data Read](/app-editor/page-flow/toolbox-blocks/data-read.md) block is used to read from the *Customers* [Database Table](/app-editor/data/database-tables.md) with the dataset name of *ds1*.
* The [Data Status](/app-editor/page-flow/toolbox-blocks/data-status.md) block is then used to check the status.&#x20;
* In the *Success Tasks* [Flow Parameter](/app-editor/page-flow/block-anatomy.md#flow-parameters) of the [Data Status](/app-editor/page-flow/toolbox-blocks/data-status.md) block, the function *Usage Example* is invoked.
* All examples will be shown implementing the *Usage Example* function containing the specific block being explained.

<figure><img src="/files/bikWk0e4wnHB8s6NVNO5" alt=""><figcaption><p>Database reading logic for examples</p></figcaption></figure>


---

# 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.zingy.ai/app-editor/page-flow/references/prerequisite-for-data-examples.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.
