--- title: "EdgeReady Database" slug: "edgeready-database-1" updated: 2022-12-20T06:59:21Z published: 2022-12-20T06:59:21Z canonical: "help.pillir.io/edgeready-database-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.pillir.io/llms.txt > Use this file to discover all available pages before exploring further. # EdgeReady Database There are five actions that can be done on the data in EdgeReady Database through the Integration builder. These actions are done using [**variable mapping**](https://help.pillir.io/docs/variables-in-ib#variable-mapping) by inserting necessary input and output variables in the "**where**" and "**to**" spaces. | EdgeReady DB Blocks Description | EdgeReady DB Blocks on Canvas | | --- | --- | | ## **Select Data** It is a simple SQL statement block to select data from a database table with or without a where condition. The data can be sorted and stored in a variable(table) The user provides the following details: - The data can be fetched by selecting the **table** and the required **columns.** - The **where** condition can be specified by selecting the required columns from the drop down list. - The corresponding **Math** **Operator** is selected. - The condition can be hard-coded in the oval box or an **input variable** can be added. - A '**+**'and '**-**' icons are visible by hovering the cursor to **add/delete** variable fields. - The **sort by** field and order is specified (either ascending or descending). - The resultant data is stored in the **output variable** that is dragged in the "**to**" oval box. - Variable mapping is done by clicking the variable mapping icon (highlighted in the image). **Note** For more information on input and output variables, refer [Input, Output and Local Variables](https://help.pillir.io/docs/editing-placement-and-other-block-actions#inputoutput-local-variables) section. | ![ERdb-selectblock](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/ERdb-selectblock.png) | | ## **Create Data** It is a SQL statement block to insert new rows within a table. The user provides the following details: - In the **Create** drop down list the user selects the table into which the new row is inserted. - Columns can be added/deleted by hovering the cursor over the block that reveals a **+/-** button. - The column value can be hard-coded or an **input variable** can be added in the oval box. - Additionally, the user can add a **Math** **operation** or a **F****unction** in the oval box if required. - The user adds an output variable in the "to" oval box, where the id(primary key) of the new row is stored. **Note**Adding an Output variable in "**to**" is optional for a **Create** block. | ![ERdb-Create](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/ERdb-Create.png)Adding a Mathematical Operation or a Function: ![ER-db-create-operator-function](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/ER-db-create-operator-function.png) | | ## **Update Data** It is a SQL statement block to update existing data within a table. The user provides the following details: - The **Table** name is selected. - The column to be updated is selected in **SET**. The column value can be hard coded or an input variable is added. - Additionally, the user can add a **Math****operation**(=,>=,<=,>,<) or a **F****unction** in the oval box to make modifications to the new data if required. - Columns can be added/deleted by hovering the cursor over the block that reveals a **+/-** button. - The **Where** condition is specified. It is hardcoded or an input variable can be added. An inequality operation or a function can be added as well. | ![ERdb-update](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/ERdb-update.png) | | ## **Delete Data** It is a SQL statement block to delete existing data within a table. The user provides the following details: - The user selects the existing table name from the **Delete** dropdown list**.** - The **Where** condition is specified. It is hardcoded or an input variable can be added. - Additionally, the user can add an **Math** **operator** or a **F****unction** in the oval box if required. - Columns can be added/deleted by hovering the cursor over the block that reveals a **+/-** button. | ![ERdb-delete](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/ERdb-delete.png) | | ## **Prepared Statements** This block is used to execute Prepared SQL Statements with or without parameters **Uses:** - Queries within a Prepared Statement block can be written with clauses, operators, keywords, functions including count(), avg(), json_extract(), etc., and statements like case, group by etc. - Writing queries offers more flexibility while joining multiple tables. The user provides the following details: - A SQL query in the **Prepared Statement** oval box. - Parameters fields accepts Input Variables or Local Variables or hard-coded values NoteTo add or remove parameters, click the + and - icons. (*these icons are displayed while hovering the cursor at the end of the parameters field.*) - An output table variable is added in the "**to**" oval box. - Click the **Variable mapping** icon to map the columns if required. For more information on Prepared statements, refer the [Troubleshooting](https://help.pillir.io/v1/docs/troubleshooting-1) section. | ![ERdb-preparedstatements-new](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/ERdb-preparedstatements-new.png) |