Skip to content

Table

You can create tables in the database. Table specifications are MySQL 8.0 compatible. The database is created on a GUI basis.

Table Creation

Open the tree of the database for which you want to create tables and right-click on "Tables" to open the context menu. Select "Context Menu" - "Create Table" - "Normal Table". An input screen for creating a new table appears in the right pane.入力スクLean has basic information at the top, and below that, the Columns tab, Index tab, Foreign Keys tab, and Triggers tab. Make the necessary entries, click the "Apply" button, and follow the instructions to create the table. Basic information will include the following:

SettingDescription
Table nameEnter a table name
Character setEnter the character set for the table. Defaults to the database setting. Cannot be changed.
CollationEnter the collation for the table. Defaults to the database setting. Cannot be changed.
Storage engineIt is InnoDB. Cannot be changed.

Column

After selecting the "Columns" tab, register the column information that makes up the table. Repeat the following steps.

ActionDescription
Add column1. Click the [+] button. Follow the entry instructions.
2. After column addition is complete, click the "Apply" button.
Delete columnCheck the columns you wish to delete and click the Delete button.

Input Description

SettingDescription
Column nameEnter a column name.
Data typeEnter data type for the column. Depending on the selection of data type, the constraints and digit fields that can be set change from active to inactive.
M- DECIMAL type: Sum of integer and decimal digits (1 to 65). If omitted, 10 is handled.
- CHAR type: Number of characters that can be stored (0 to 255). If omitted, treated as 1.
- VARCHAR type: Number of characters that can be stored (0 to 65,535). Cannot be omitted.
- BINARY type: Number of bytes that can be stored (0 to 255). If omitted, treated as 1.
- VARBINARY type: Number of bytes that can be stored (0 to 65,535). Cannot be omitted.
D- DECIMAL type: Number of decimal places (0 to 30). If omitted, treated as 0.
PKPRIMARY KEY Constraint
NNNOT NULL Constraint
UQUNIQUE Constraint
UNUNSIGNED Constraint
AIAUTO_INCREMENT attribute

Tips

Data type

Number types

Data typeRange (signed)Range (when unsigned UN is specified)
TINYINT-128~1270~255
SMALLINT-32768~327670~65535
MEDIUMINT-8388608~83886070~16777215
MINT-2147483648~21474836470~4294967295
BIGINT-9223372036854775808~92233720368547758070~18446744073709551615

Floating point type

Data typeRange
FLOAT-3.402823466E+38~-1.175494351E-38, 0, 1.175494351E-38~3.402823466E+38
DOUBLE-1.7976931348623157E+308~-2.2250738585072014-308, 0,

Fixed-point type

Data typeRange
DECIMALM is the sum of integer and decimal digits (1 to 65) If omitted, it is treated as 10 D is the number of decimal places (0 to 30) If omitted, it is treated as 0.

Date type and time type

Data typeFormatRange
DATE’YYYY-MM-DD''1000-01-01’~‘9999-12-31’
DATETIME’YYYY-MM-DD HH:MM:SS''1000-01-01 00:00:00’~‘9999-12-31 23:59:59’
DATETIME(fsp)‘YYYY-MM-DD HH:MM:SS.fraction''1000-01-01 00:00:00.000000’~‘9999-12-31 23:59:59.999999’
TIMESTAMP’YYYY-MM-DD HH:MM:SS''1970-01-01 00:00:00’ UTC ~ ‘2038-01-19 03:14:07’ UTC
TIMESTAMP(fsp)‘YYYY-MM-DD HH:MM:SS.fraction''1970-01-01 00:00:00.000000’ UTC ~ ‘2038-01-19 03:14:07.999999’ UTC
TIME’HH:MM:SS''-838:59:59’ ~ ‘838:59:59’
TIME(fsp)‘HH:MM:SS.fraction''-838:59:59.000000’ ~ ‘838:59:59.000000’

Tips

String type

Data typeCharacteristicRange
CHARfixed length stringM is the number of characters that can be stored (0 to 255).
VARCHARvariable length stringM is the number of characters that can be stored (0 to 65,535) Cannot be omitted

Binary string type

Data typeCharacteristicRange
BINARYfixed length binary stringM is the number of bytes that can be stored (0 to 255).
VARBINARYvariable length binary stringM is the number of bytes (0-255) that can be stored.

BLOB type

Data typeCharacteristicMaximum length (bytes)
TINYBLOBvariable length binary string255
BLOBvariable length binary string65,535
MEDIUMBLOBvariable length binary string16,777,215
LONGBLOBvariable length binary string4,294,967,295

TEXT type

Data typeCharacteristicMaximum length (bytes)
TINYTEXTvariable length character string255
TEXTvariable length character string65,535
MEDIUMTEXTvariable length character string16,777,215
LONGTEXTvariable length character string4,294,967,295

Index

Select the "Index" tab to display the index list. Repeat the following steps:

ActionDescription
Add Index1. Click [+] button.
2. Enter the index name and index type.
3. With the row with the index name selected (highlighted), check the columns to which you want to apply the index from the right side and click the "Apply" button.
Delete Index1. Check the row with the index name you wish to delete and click the Delete button.
2. After a row is deleted from the index name list, click the "Apply" button.

Input Description

SettingDescription
Index NameEnter an index name.
Index TypeEnter the index type.
Index ColumnSpecify by check which columns to add indexes to. If multiple checks are made, the index will be a composite index.
Combined index number (#)Specifies the composite index number.
Index sequenceSpecifies ascending (ASC)/descending (DESC) order of indexes.

Index Type

The index types that can be added are as follows

Index TypeDescription
INDEXGeneral Index
UNIQUEIndex with unique constraints
FULLTEXTIndex for full text search
PRIMARYIndex of primary key

Tips

Tips

Specifying an index length allows indexes to be created on only the specified length of column values. The meaning of length depends on the data type. BLOB and TEXT types must be specified.

Data typeMeaning of LengthRequired
CHAR typenumber of characters
VARCHAR typenumber of characters
BINARY typenumber of bytes
VARBINARY typenumber of bytes
TINYBLOB typenumber of bytesrequired
BLOB typenumber of bytesrequired
MEDIUMBLOB typenumber of bytesrequired
LONGBLOB typenumber of bytesrequired
TINYTEXT typenumber of charactersrequired
TEXT typenumber of charactersrequired
MEDIUMTEXT typenumber of charactersrequired
LONGTEXT typenumber of charactersrequired

Foreign key

Select the Foreign Keys tab to display the foreign key list. Repeat the following operations.

ActionDescription
Add foreign key1. Click [+] button.
2. Enter the foreign key name and referenced table information.
3. From the column list on the right, select the column for which you want to set a foreign key and the column to which you want to refer.
4. Set the foreign key option.
5. Click the "Apply" button to confirm.
Delete foreign key1. Check the row for the foreign key name you wish to delete and click the Delete button.
2. After the row is deleted from the foreign key list, click the "Apply" button.

Input Description

SettingDescription
Foreign key nameEnter a foreign key name.
Reference table nameSpecifies the table to which the foreign key refers.
Foreign key columnSpecify the column of the table for which the foreign key is to be set.
Reference columnSpecifies the column that the foreign key refers to.
Action on foreign key updateSelect the foreign key option. The default is NO ACTION.
Action on foreign key deletionSelect the foreign key option. The default is NO ACTION.

Tips

Foreign Key Option

Actiontime of updatetime of deletion
RESTRICTIf the reference is updated, an errorIf the reference is deleted, an error
CASCADEUpdated when references are updatedDeleted when the reference is deleted
SET NULLReplaced by NULL when the reference is updatedReplaced by NULL when the reference is deleted
NO ACTIONSame as RESTRICTSame as RESTRICT

Table Update

  1. After the table is created, select the table from the tree.
  2. Change the table settings and click the "Apply" button.
  3. The changed part will be updated.

Table Deletion

  1. Right-click on the table you wish to delete and click "Context Menu""Delete Table".
  2. The table will be deleted.

Tips

Data Display

Selecting the "Data" tab will display the data in the table (up to 1,000 records) in a table. You can use the "Column Filter" to narrow down the data.

Tips

Add Record

After the data is displayed, records can be added by the following operation.

  1. Click the [+] button.
  2. Enter a record on a new line.
  3. Click the "Commit" button.

Update Record

After displaying data, records can be updated by the following operation.

  1. Click the [+] button.
  2. Click on each cell in the row you want to update to change the record contents.
  3. Click the "Commit" button.

Delete Record

After the data is displayed, records can be deleted by the following operation.

  1. Check the beginning of the record you want to delete.
  2. Click the Delete icon to remove a record from the table.
  3. Click the "Commit" button.

Export

Data can be exported on a table-by-table basis. When exporting, there are two export types "File" and "Folder". Export type "File" is the same functionality as in V1.3.3 and earlier exports. Use "folder" if any of the following apply

  • If the table contains binary data
  • When export data is several tens of MB

<When using export type "Folder">

  1. Click on the "…"to the right of the table you wish to export and select "Export".
  2. Select "Folder".
  3. Select the folder path to export to and click the "Export" button.
  4. The export job is started. The status of jobs can be checked on the Service Request screen.
  5. Exported to the target path with the following folder structure
    <target path>/
    - <base folder>/
    - rows/
    For information on each folder, output files, and file formats, see the Exporting Databases page.

Tips

<When using export type "File>

  1. Click on the "Vertical Triple Point Reader"to the right of the table you wish to export and select "Export".
  2. Select "File".
  3. The CSV file is downloaded locally.

Tips

Import

Data can be imported into the table using the file output by the export function described above.

<For data exported with export type "Folder">

  1. Click on the "…" to the right of the table you wish to import and select "Import".
  2. Select "Folders". Select the exported base folder and the exported data and press the "Import" button.
  3. The import job is started. The status of jobs can be checked on the Service Request screen.
  4. The contents of the specified folder will be imported into the table.

Tips

<For data exported with export type "File" >

  1. Click on the "…" to the right of the table you wish to import and select "Import".
  2. Select "File".
  3. The contents of the specified folder will be imported into the table.

The CSV file should follow the following format

SettingDescription
File encodingUTF-8
1 recordone row
Escape character\ (backslash)
Newline characterCRLF or LF
Delimiter, (comma)
Enclosing letter” (double quotation)
HeaderExcluded

CSV data example

"P_001","2020-09-21","P_001",140.0,4.0,8.0
"P_002","2020-09-14","P_002",100.0,1.0,8.0
"P_003","2020-09-08","P_003",120.0,3.0,8.0

Tips

ER Diagram

ER diagrams can be output as a physical model of the database based on information extracted from the database. For more information on ER diagrams, please refer to the ER diagram.