When you create a new field in the table, you must select its type.




The following types are available:


 Data type

 Description

 TEXT

 any text, such as name or company name

 INTEGER

 number without fractional part, e.g. the number of something in pieces

 REAL

 floating-point number, such as 3.14

 CURRENCY

 is the same as the "REAL" type, but allows you to specify the formatting, for example: $25.00

 BOOLEAN

 assumes Yes or no value

 DATE/TIME

 date and time, for example 12/31/2020 11:00:00AM

 DATE

 date only

 TIME

 time only

 IMAGE

 type allows you to save the image as directly in the database or save a link to an external image file on local PC

 FILE

 type allows you to save the file as directly in the database or save a link to an external file on local PC

 COUNTER

 automatically assigned a unique sequential value for the record

 Calculated field

 calculation field. Other table fields, SQL sub-queries and built-in functions can be used as arguments

 Relationship

 special field, for establishing links between tables




Depending on the data type, different settings are available for the field to be created.





Adjustment of fields with type: TEXT, INTEGER, REAL, BOOLEN, DATE/TIME, DATE, TIME, IMAGE, FILE



For the fields of these types, you can specify



Default value:

This value will be added to all records for this field, unless another value is specified.


For fields with DATA/TIME type, the following date-time format is used: YYYY-MM-DD HH:MM:SS, e.g.: 2020-01-31 12:00:00

For fields with DATA type, the following format is used: YYYY-MM-DD, e.g.: 2020-01-31

For fields with TIME type, the following format is used: HH:MM:SS, e.g.: 12:00:00



Not null:

This field will be mandatory. When creating and editing a record, if the value for this field is left blank, the user will be notified of the necessity to fill it.





Setting up a field with the type: CURRENCY



These settings allow you to set the currency format, such as unit designation, number of decimal places and thousand separator. This way, the currency values in TableGrid and Edit components will look like this:


   





Calculated field


A special field type created as a result of calculations based on existing fields in the table.


For example, you have such fields as "price" and "quantity" to find out the full cost of the order, you need to multiply the "price" by "quantity", you can do this using the calculated field.





This way, you can see the result of the calculation in the TableGrid component as a usual column.




Also in the calculated field you can write an SQL query, which must be enclosed in brackets.




Relationship


To create external keys to other database tables, a special field type is used.




Pay attention to the checkbox "Cascade delete". This option is necessary to support data integrity, for example, if you delete a client from the database, then all orders, which belong to this client, will be automatically deleted.




Important! If you are not familiar with the basic principles of database structure design, please read the material on this link, namely, the first chapter "1.Introduction".