logologo
Get Started
Guide
Development
Plugins
API
English
简体中文
Get Started
Guide
Development
Plugins
API
English
简体中文
logologo
Overview

Data sources

Data source manager
Main data source

External data sources (Databases)

Overview
External MySQL
External MariaDB
External PostgreSQL
External MSSQL
External Oracle
Main vs External Databases
REST API data source
KingbaseES data source

Collections

Overview
General collection
Inheritance collection
File collection
Tree collection
Calendar collection
Comment collection
Expression collection
SQL collection
View collection

Collection fields

Overview
Field Validation

Basic

Single text
Long text
Phone
Email
URL
Integer
Number
Percent
Password
Color
Icon

Choices

Checkbox
Select
Multiple select
Radio group
Checkbox group

Media

Markdown
Markdown (Vditor)
Rich text
Attachment (Relationship)
Attachment (URL)

Date & Time

Overview
Date & time (with timezone)
Date & time (without timezone)
Unix timestamp
Date (without time)
Time

Geometry

Point
Line
Circle
Polygon

Advanced

UUID
Nano ID
Sort
Formula
Sequence
JSON
Collection select
Encryption

System info

Created at
Updated at
Created by
Last updated by
Space
Table OID

Associations

Overview
One to one
One to many
Many to one
Many to many
Many to many (array)

Development

Overview
Next PageOverview

#Many-to-One

In a library database, there are two entities: books and authors. An author can write multiple books, but each book usually has only one author. In this case, the relationship between authors and books is many-to-one. Multiple books can be associated with the same author, but each book can have only one author.

ER Diagram:

alt text

Field Configuration:

alt text

#Parameter Description

#Source Collection

The source collection, which is the collection where the current field resides.

#Target Collection

The target collection, which is the collection to be associated with.

#Foreign Key

The field in the source collection that is used to establish the association between the two collections.

#Target Key

The field in the target collection that is referenced by the foreign key. It must be unique.

#ON DELETE

ON DELETE refers to the rules applied to foreign key references in related child collections when records in the parent collection are deleted. It is an option used when defining a foreign key constraint. Common ON DELETE options include:

  • CASCADE: When a record in the parent collection is deleted, all related records in the child collection are automatically deleted.
  • SET NULL: When a record in the parent collection is deleted, the foreign key values in the related child collection records are set to NULL.
  • RESTRICT: The default option, it prevents the deletion of a parent collection record if there are related records in the child collection.
  • NO ACTION: Similar to RESTRICT, it prevents the deletion of a parent collection record if there are related records in the child collection.