# How to Create a SQL Builder App

This section explains how to create a **SQL Builder** project in **AppSpace**, which allows users to build SQL queries visually based on an existing **ER Diagram** created using **Data Designer**.

***

### Prerequisite

Before creating a SQL Builder app, ensure that:

* At least one **ER Diagram** exists in the application\
  (Designed using **Data Designer** or imported from an existing database)

SQL Builder relies on the ER Diagram as the source of tables, columns, and relationships.

***

### Step 1: Open Data Designer Menu

1. Open your application in **AppSpace**
2. From the application menu, select **Data Designer**

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2F3sjIqHiIM9gRFKE5Nw2p%2Fimage.png?alt=media&#x26;token=09ad9ed3-0ef5-4ef1-8e85-b6ad6bf8f069" alt=""><figcaption></figcaption></figure>

***

### Step 2: Create a SQL Builder Project

1. Click the **Create SQL‑Builder** icon
2. A modal window opens
3. Enter a name for the SQL Builder project
4. Click **Create SQL‑Builder**

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FKfw1FdxU2nRZ3Ot5xRPN%2Fimage.png?alt=media&#x26;token=292c001e-a7b4-4533-a58b-510a6673df1b" alt=""><figcaption></figcaption></figure>

***

### Step 3: Open SQL Builder for Design

Once the SQL Builder project is created successfully:

1. Click the **Start Design SQL‑Builder** icon
2. The system opens the SQL Builder design workspace

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FJJdKnxwOnDH2wYfDbO4i%2Fimage.png?alt=media&#x26;token=5745f0f0-8611-4bc6-8098-4277f2a21a41" alt=""><figcaption></figcaption></figure>

***

### Step 4: Review the SQL Builder Design Workspace

After opening the SQL Builder project, users will see the **design canvas**, where queries are created and managed.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FMJITfTPFuhMPmr73jvsh%2Fimage.png?alt=media&#x26;token=9beeecd6-feab-433e-8fd6-8b031e7dfe64" alt=""><figcaption></figcaption></figure>

This workspace allows users to visually assemble SQL queries using entities and relationships from the ER Diagram.

***

### Step 5: Use the SQL Builder Side Menu

The **Side Menu** in SQL Builder helps users manage diagrams, connections, and queries.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FZ4OmOVUX5uZOaU0qWXvA%2Fimage.png?alt=media&#x26;token=86b87abb-e69f-42cf-983f-0777a10b90a7" alt=""><figcaption></figcaption></figure>

#### Side Menu Options

* **Search Box**\
  Search and filter elements within the side menu.
* **Connection**\
  Manage database connections for query execution.
* **My ER‑Diagram**\
  View ER Diagrams in the application and include tables in the design canvas.
* **My Query**\
  View existing SQL Builder queries and reuse or include them in the design.

***

#### Collapse or Expand the Side Menu

The Side Menu can be collapsed or expanded by clicking the **AppSpace icon**, providing more space on the design canvas when needed.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FgcoXj4rNRF297RI8OVau%2Fimage.png?alt=media&#x26;token=4e73f6e9-bb32-41e0-81ed-fc6de97a7238" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FfAX1rvFXSK9PHWRO6MfB%2Fimage.png?alt=media&#x26;token=677af61a-3841-454f-a62c-9153428d166c" alt=""><figcaption></figcaption></figure>

***

### Summary

Creating a **SQL Builder App** in AppSpace allows users to start building SQL queries visually using an existing **ER Diagram**.

With SQL Builder, users can:

* Create query projects without writing SQL manually
* Select tables and columns from ER Diagrams
* Manage reusable queries within the application
* Integrate queries with Processes, Microflows, or other components

SQL Builder works together with **Data Designer** to provide a complete, low‑code database design and querying experience in ONEWEB.


---

# 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.onewebstack.com/designer-reference/data-designer/sql-builder/how-to-create-a-sql-builder-app.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.
