Indexes / Constraints

Learn how to manage PK, FK, and Indexes (including Unique) in the Schema Editor.

Primary Key (PK)

Set up and manage the primary key of a table.

1

Set PK in Schema Editor

When you open a table, the Table Columns grid is displayed in the Schema Editor. Select the "PK" checkbox for the column you want to designate as PK.

2

Composite PK

Select the PK checkbox on multiple columns to set a composite Primary Key.

PK 설정
Tip

Columns with PK set are automatically shown as a PRIMARY index with Type "UNIQUE" in the Indexes section below.

Foreign Key (FK)

Manage foreign keys that define referential relationships between tables.

1

Check Foreign Keys Section

View the FK list for the current table in the Foreign Keys section at the bottom of the Schema Editor.

2

Add FK

Click the "+ ADD FOREIGN KEY" button to open the FK creation modal.

3

Map Referenced Table & Columns

Select the referenced table in the modal, and its PK columns will be auto-displayed. Map a type-compatible column from the current table, or toggle "New Column" to create a new column.

4

Confirm FK Name

The FK name is auto-generated in the format fk__to_. You can modify it manually if needed.

FK 설정
FK List ColumnDescription
FK NameForeign key name
FK Column(s)FK column(s) in the current table
Referenced TableReferenced table
Referenced Column(s)Column(s) in the referenced table
ActionsFK delete button

Index Management

Create and manage indexes for query performance optimization. Unique constraints are also set through index creation.

1

Check Indexes Section

View the index list for the current table in the Indexes section at the bottom of the Schema Editor.

2

Add Index

Click the "+ ADD INDEX" button to open the index creation modal.

3

Set Index Name & Options

Enter the index name. If a Unique Index is needed, select the "Unique" checkbox.

4

Select Columns & Sort Order

Select columns from the left "Available Columns" list and move them to the right "Selected Columns". Use drag & drop or arrow buttons to move/reorder columns. Double-click a selected column to toggle its sort order (ASC/DESC).

인덱스 관리
Index List ColumnDescription
Index NameIndex name
TypeUNIQUE or INDEX
Column(s)Columns included in the index
Index TypeIndex type (BTREE, etc.)
ActionsIndex delete button

Note: Unique constraints are not a separate setting. Instead, select the "Unique" checkbox when adding an index. Selecting multiple columns creates a composite Unique index.