4D v13.4

Rules for naming tables and fields

Home

 
4D v13.4
Rules for naming tables and fields

Rules for naming tables and fields  


 

 

Field and tables names must respect the following rules:

  • The name can contain up to 31 characters.
  • It must start with a letter of the alphabet.   
  • It may contain any combination of letters, numbers, spaces and underscores.
  • The following characters are not allowed in table names (will generate an error in the Structure editor): ( ) + - / * " ; = & | # > < ^ ' { } % DIAMOND (0x00D7), CUBE (0x00B3), SQUARE (0x00B2), PLUS-MINUS (0x00B1)
  • In general, you must avoid any characters that might cause the name to be misinterpreted in 4D or via external languages, such as punctuation marks (commas, colons, etc.)
  • 4D truncates table names that exceed 31 characters and removes any spaces from the beginning or end of the name.
  • Do not use the same name for two visible objects. If you use the same name twice, a warning dialog box will inform you that another visible object already has the same name and that the entry is not possible.
  • Do not use reserved names for naming a table or field. Reserved names include command names (Date, Time, etc), keywords (If, For, etc.) and constants.

Note: Additional rules must be respected when objects must be handled via SQL: only the characters _0123456789abcdefghijklmnopqrstuvwxyz are accepted, and the name must not include any SQL keywords (command, attribute, etc.). The ”SQL” area of the Inspector palette will warn you if a name does not respect an SQL rule (see UNREGISTER CLIENT).

Tip: Although it is possible to insert spaces in object names, entering a name with no spaces will allow you, in the Method editor, to select the object by double-clicking directly on it. It is thus generally recommended to use an underscore instead of a space.

 
PROPERTIES 

Product: 4D
Theme: Creating a database structure