Skip to content

Storage Format

Data Table Storage

When the data source type of a data table is default, the system will create a real data table for it and automatically create the following two fields:

FieldTypeDescription
idvarchar(32)System-generated unique ID, primary key
seqint(8)Order of data addition

The ID of the data table is z_appId_tableId where appId is the application ID and tableId is a 12-digit unique ID generated by the system.

Notes

Most database management tools sort tables by table ID. The z_ prefix distinguishes system tables from tables generated by Informat, making it easier for administrators to view.

Data Table View in Database

In the database table structure generated by the system, both table names and field names are internal IDs, which have poor readability when directly accessing the database. When creating database tables, Informat automatically creates a view for each data table using its identifier.

Notes

If a data table is dependent on another application's data table, Informat will also automatically create a view.

View Example

Table name: z_appid_xju88c8halqop, data table identifier: demoTable

Column NameIdentifierNote
ididSystem-generated primary key
caczccdcd882pnameName
o8n0ezwhf1rmkmaxAgeMaximum Age

Generated view name: v_appid_demo_table

Column NameNote
idSystem-generated primary key
nameName
max_ageMaximum Age

Notes

Since tables and fields in the database are case-insensitive, when generating views, Informat converts uppercase letters in identifiers to lowercase letters. For readability, underscores _ are used to separate two words. For example, if the identifier is maxAge, the generated view column name is max_age.

Change Log Table

For data tables with record change logging or comments enabled, the system automatically creates a change log table for each table to record field changes.

The name of the change log table is z_appId_tableId_changelog

The structure of the change log table is as follows:

FieldTypeDescription
idintAuto-increment primary key
record_idvarcharRecord ID
field_idvarcharID of the changed field
field_namevarcharName of the changed field
before_valuejsonbField value before change
after_valuejsonbField value after change
create_user_idvarcharID of the creator
create_timedateCreation time

before_value and after_value structure:

typescript
interface ValueChange {
    /**
     * Field type, e.g., SingleText
     */
    type: string;
    /**
     * Whether the field value is multi-select
     */
    multiple: boolean;
    /**
     * Field value
     */
    value: object;
    /**
     * String form of the field value
     */
    valueString: string;
}

Comment Table

For data tables with comments enabled, the system automatically creates a comment table for each table to record user comments.

The name of the comment table is z_appId_tableId_comment

The structure of the comment table is as follows:

FieldTypeDescription
idintAuto-increment primary key
record_idvarcharRecord ID
parent_idintParent node ID of the comment, used to record which comment this is a reply to
commenttextComment content
is_deletedboolWhether the comment is deleted
create_user_idvarcharID of the creator
create_timedateCreation time