Database Relation
What is a data link key or database relation?
"Data link keys" and "database relations" are functions that relate multiple databases. They are equivalent to "relations" in general relational databases.
The related results are displayed on the admin panel's "relation data" or "data report" tabs.
- Operate related items on the "relation data" tab on the admin panel
To output data in a data report, specify the data to be output in "data source settings" under "database combinations" and "output field settings".
Steps to relating a database
To relate databases, configure database relationships. For this, we call configure database.
The steps for a relation database are as follows: We'll assume you want to relate the id of table_1 to the sales_id of table_2.
- Database related settings
- Add table_2 to the related database in the Database Related Settings tab of table_1
- Specify id of table_1 and sales_id of table_2 in "add data link key link settings"
- Click the start creating related data link button
- Create data reports
- In "data report condition settings", specify table_1 as "data source settings"
- Specify table_2 as "database join"
- Select columns for table_1 and table_2 in "output field settings"
Database relation
Database Relation sets the relationships between databases.。
Database relation settings
- Switch to database relation settings tab
- Configure database relation
- application
- Database
- Click the add button
- Select the field to be linked as the data link key and click the add button
- Click on the start creating relation data link button
You have now added the database relation.
To add multiple link settings, click + add data link key link settings
Delete database association
Click the delete icon under "database relation"
Start creating the relation data link
Start creation of relation data link is executed at the following timing:
- When adding a new "database relation"
- When changing the "database relation"
- When "database relation" is deleted
When multiple "database relation" and "data link key link settings" are added, run only once.
Display concatenated in data report
By using a data report, you can relate databases and display them as a single table.
- For basic data report settings, see data report settings.
Advance preparation
To use this feature, set up a database relation in advance for the fields you wish to associate on the database settings page. Then, set up database joins in the "data source settings" under data report condition settings in the data report.
Here, we assume that you want to relate the id of table_1 with the sales_id of tables_2.
Create a data report
- Click “+create a new data report”
- When the "data report condition settings" page is displayed, enter the data report name in "basic settings".
Setting up a data source
- Call "data source settings".
- Select table_1 as "data source"
- Specify table_2 as "database join"
Set output fields
- Select the columns of table_1 in "output field settings"
- Select the columns of table_2 in "output field settings"
- Click the view report button.