Skip to main content

Create from Database

If you need to use a relational database, you can also create models using a self-built MySQL database.

Self-hosted MySQL databases, whether deployed on Tencent Cloud, other cloud service providers, or self-managed servers, can be integrated as long as they are accessible via the public network.

When using a self-hosted MySQL database, you need to configure the database connection to integrate with the self-built database. The connection configuration includes the database address (domain name or IP), port, database name, username, password, and optional connection parameters.

1. Create Model

Select Import from self-hosted MySQL database.

Select existing database connection information or configure new database connection information.

image

After selecting the database connection information, the backend will read the selected database tables.

Further select which table to import into the model.

The system will automatically perform field mapping based on existing data, and you can also make adjustments according to your actual situation.

image

Additionally, the system will automatically generate several fields (data identifier (_id), creation time (createdAt), update time (updatedAt), owner, created by (createBy), modified by (updateBy), record creator (_openid)) and update the database table. image.png

After a successful import, the original data can be viewed in Content Management.

image.png

All data written to the data table will be synchronized to the collection, and data written to the collection will also be displayed in the data table.

2. Write Content

Edit data in the data table and perform operations such as CRUD, import/export, filter/sort, etc.

image.png