> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Dataset from a Database

> This article explains how to create a dataset from a database, including prerequisites, detailed steps, and how to use the database data for analysis on the report page.

This approach lets you reuse data already stored in an external database directly within your app, without manually re-entering the records.

## Prerequisites

Before creating a dataset from a database, add a database Data Source to your app. For detailed steps, see Create a Data Source.

## Steps

1. Sign in to the YiDA workbench and go to the app settings page.
2. Click **Data Factory** > **Dataset**.
3. Click **Create Dataset** > **From Database**.

<Steps>
  <Step title="Add the target database and table, then set the dataset name." />

  <Step title="Select the fields to add, set an alias for each field, and click Confirm to complete the setup." />
</Steps>

## Use Database Data

* On the report page and in data preparation, select the relevant dataset to quickly create a report for analysis.

* Example of using data from a specific MySQL database in a report.
