ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Editors / Data model editor / Logical Data Model
  • Types of items
  • Array items
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Types of items
The different types of items proposed in the data model editor are as follows:
TypeUsed to store:
Textalphanumeric characters
  • String: a character string of up to 65,535 characters. This character string is in Ansi format.
  • Text memo: a character string of up to 4 GB. The RTF format is supported. This text memo is in Ansi format.
  • Character: a single character (initialized by a binary 0, Caract(0)).
  • Unicode: a character string in Unicode format.
  • Unicode text memo: a character string up to 4 GB in size. This text memo is in Unicode format.
Numerica numeric value
  • 1-byte signed integer: value between -128 and 127
  • 2-byte signed integer: value between -32.768 and 32.767
  • 4-byte signed integer: value between
    -2.147.483.648 and 2.147.483.647
  • 8-byte signed integer: value between -9.223.372.036.854.775.808 and 9.223.372.036.854.775.807
  • 1-byte unsigned integer: value between 0 and 255
  • 2-byte unsigned integer: value between 0 and 65.535
  • 4-byte unsigned integer: value between 0 and 4,294,967,296
  • 8-byte unsigned integer: value between 0 and 18,446,744,073,709,551,615
  • 4-byte real: value between -3.4e+38 and +3.4e+38
  • 8-byte real: value between -1.79e+308 and +1.79e+308
  • Decimal (Numerical WLanguage): a decimal can have up to 38 significant digits.
Currencya currency
A currency can contain up to 24 significant digits (up to 18 digits for the integer part and up to 6 digits for the decimal part) and it can take a value between -604 462 909 807 314 587,353 087 and +604 462 909 807 314 587,353 087.
Datea date or a duration
  • Date (YYYYMMDD): a date in YYYYMMDD format (dates between 01/01/0001 and 31/12/9999)
  • Date and Time: a date-time (between 01/01/0001 at 00:00 and 31/12/9999 at 23:59). The precision is up to the millisecond.
  • Duration: a duration in milliseconds (between
    -9.223.372.036.854.775.808 and 9.223.372.036.854.775.807).
Timea time
  • Time (HH): Time between 00H and 23H
  • Time (HHMM): Time between 00H00 and 23H59. The precision is up to the minute.
  • Time (HHMMSS): Time between 00H00min00ss and 23H59min59ss. The precision is up to the second.
  • Time (HHMMSSCC): Time between 00H00min00ss00cs and 23H59min59ss59cs. The precision is up to the tenth of a second.
Tip: To keep time accurate to one hundredth of a second, use the "Date and Time" type.
Booleana boolean (1: True and 0: False)
Sound, image, binary, ...a binary file or string
  • Image (binary memo): an image file
  • Sound (binary memo): a sound file
  • OLE (binary memo): an OLE file
  • Other binary memo: any file type
  • Binary string: a string in binary format
Check Boxa value associated with a Check Box control
  • Switch: a Boolean (1: True and 0: False)
  • 1-byte unsigned integer: a value between 0 and 255
Radio Button, List Box, Combo Boxa value associated with a Radio Button control, a List Box control or a Combo Box control.
You have the ability to select the following sub-type:
  • 1-byte integer: an index corresponding to a list of values. The value of this index ranges from -128 to 127
  • 2-byte integer: an index corresponding to a list of values. The value of this index ranges from -32.768 to 32.767
  • 4-byte integer: an index corresponding to a list of values. The value of this index is between
    -2.147.483.648 and 2.147.483.647
  • 1-byte unsigned integer: an index corresponding to a list of values. The value of this index ranges from 0 to 255
Automatic IDthe identifier of each file record.
Its value is automatically updated by the engine of the HFSQL database.
  • Automatic identifier (4 bytes): the identifier for each record (value between 0 and 2,147,483,647)
    This type corresponds to the "Identifier" type of WINDEV 5.5
  • Automatic identifier (8 bytes): the identifier for each record (value between 0 and 9.223.372.036.854.775.807)
  • Automatic UUID (128 bits): each record identifier corresponds to a 128-bit UUID. In this case, the UUID is used to obtain a non-sequential unique identifier.
  • Automatic UUID (256 bits): each record identifier corresponds to a 256-bit UUID. In this case, the UUID is used to obtain a non-sequential unique identifier.
Note: The same record can have an automatic UUID and an automatic Identifier (for example, to simplify the migration of an existing record)..
XMLan XML character string (4 GB maximum). This string is stored as a text memo.
Full-text indexthe different elements of the full-text index. The full-text index can include text items or text memo items.
For more details on how to create a full-text index in the analysis, see Search and full-text index.
Enumeration, Combination
  • Enumeration: an integer value among the possible values defined in the enumeration associated with the field.
  • Combination: an integer value representing a combination of the possible values defined in the combination associated with the item.
For details on how to create an Enumeration or Combination item, see Enumeration and Combination items.
Calculated item / Formulaa character string in SQL language representing a calculation formula. The formula can use SQL functions and/or WLanguage functions (WL.). Only the formula is stored, the value is calculated when accessing the record in read-only.
For example, calculating the age from the DateOfBirth item of the file. The value will be calculated in the data file directly.
CAST(TO_CHAR(SYSDATE,'YYYY') AS int)
- CAST(TO_CHAR(datenaissance,'YYYY') AS int)
However, the calculated value can be stored in the file to avoid having to perform the calculation again.
It's possible to store the formula in Unicode: the calculation will be faster, but the space occupied by the formula will be larger.
If the record is modified, the calculation formula is re-run in order to update the buffer of the data file with the new value.
Warning: NULL handling complies with the SQL standard. For example, if an expression adds the NULL value to a value, the result corresponds to the NULL value.
AndroidAndroid Widget Only calculated fields containing SQL functions can be used.. Items calculated with "WLanguage functions" instructions are not available on Android.. Their value cannot be read.
Timestampa DateTime or a Date or a Time representing the creation date of the record or the date of the last modification performed on the record.
You can choose:
  • whether the creation date or the last modification date must be saved.
  • whether the local time or the UTC time must be used.
This item type is also called "Automatic DateTime item".
UUIDa UUID. A UUID (Universal Unique IDentifier) is a random number deemed unique. A UUID is useful to easily and reliably identify any element.
You can choose:
  • a 128-bit UUID. This type of UUID item complies with the 128-bit RFC 4122 standard. Only the 128-bit UUID is standardized.
  • a 256-bit UUID.
To manage an automatic identifier of type UUID (automatically initialized by HFSQL), it is necessary to use an item of type "Identifier", with the "Automatic UUID" subtype.
Note: The main advantage of the UUID is that it enables anonymization and pseudonymization, which is useful for GDPR compliance.. The UUID also allows you to manage cryptocurrency identifiers.
JSONa JSON string. This item type can contain NULL, an empty string or a valid JSON. JSON is automatically verified when the record is written.
This item type is used with JSON SQL functions in particular.
Passworda string used as a password.
The string contained in this item is salted and hashed. The result of these operations is stored in the item, as well as the salt and the type of algorithm used. It is not possible to reconstruct the original password using this data..
This password cannot be displayed to the user.
You can choose:
  • the key derivation function,
  • the hash algorithm,
  • the number of iterations,
  • the output length.
For more details, see Type of field: Secure password.
Geometric datageometric data, represented on an Euclidean plane. It can correspond to one of the following subtypes:
  • 2D Point,
  • 2D Linestring,
  • 2D Polygon,
  • 2D MultiPoint,
  • 2D MultiLinestring,
  • 2D MultiPolygon.
This item type can be a spatial key.
Geographic datageographic data, using geographic coordinates (latitude and longitude). It can correspond to one of the following subtypes:
  • Geographic Point,
  • Geographic Linestring,
  • Geographic Polygon,
  • Geographic MultiPoint,
  • Geographic MultiLinestring,
  • Geographic MultiPolygon.
This item type can be a spatial key.
Any type of geometric or geographic datageometric or geographic data. In this case, the data corresponds to a geometry (defined in 2D or geographic coordinates).

Remarque: Unicode fields are managed by the wdxxxuni.dll library.. This library is not available in WINDEV Mobile.

Array items

Some field types can correspond to an array: the contents of the field will be indexed.
To define an Array item:
  1. Create an item. The field types that can correspond to an array are: Text, Numerical, Monetary, Date, Time, Boolean, Switch.
  2. In the item description:
    • Check "Array" and specify the array dimension.
      Warning: The array size is fixed.. The corresponding space is reserved even if the item is not filled.
    • The actual item size is displayed.
  3. Specify (if necessary) the default values of each array element.
  4. Confirm.
Remarks:
  • The first index starts at 1.
  • The syntax for manipulating array fields is: <Nom fichier>.<Nom rubrique>[<Indice>]
  • Warning: This type of heading is retained for compatibility purposes.. Most of SQL databases do not support this item type.
Minimum version required
  • Version 9
This page is also available for…
Comments
Formula not working
With new features, like Formula, is it at all possible to provide a working example???
Christo
01 Dec. 2016

Last update: 09/19/2024

Send a report | Local help