Tables
This function is used to create and modify the tables in the database, by describing their characteristics in the data dictionary for the folder. The confirmation of this description is then used to create the table in the database or to modify the characteristics.
The management of the tables is used to define the list of the tables in the database. In fact, activity codes are used to inhibit certain tables and/or certain indexes.
In addition to the structure of the table itself, the following are also defined in this dictionary:
- the links to other tables (referential integrity links). These links are used by the cancellation utilities, by the import-export functionality and by other tools of this type.
- the information proposed by default in the screens created from these tables (help key-words, format information, etc.).
A table is identified by its name (uppercase alphanumeric starting with a letter), and it possesses an abbreviation. The creation of new tables during the localization/customization phase assumes that the name starts with one of the letters X,Y or Z. The name and abbreviation must be unique within the database (no two tables can exist with the same name, which is logical and the same goes for the abbreviation: this last restriction is not valid for the screens).
A table can then be manages with the help of an object, on the condition that the necessary screens are created.
Warning:
It is not possible to add fields, specific or vertical characteristics on tables of type "system" or "dictionary". The specific is not maintained upon folder validation or migration.
Prerequisite
Refer to documentation Implementation
Screen management
The definition of a view is done using three tabs: a query definition tab, the field definition tab and the key definition tab.
Header
| Table code (field CODFIC) |
|
The table code must be composed of 1 to 10 characters (letters or numbers but must start with a letter). It is the unique identifier for all the table abbreviations of the data dictionary. The Adonix reserved words are prohibited. |
| Abbreviation (field ABRFIC) |
|
The abbreviation for a table must be composed of 1 to 3 characters (letters or numbers but it must start with a letter). It is the unique identifier for all the table abbreviations of the data dictionary. The Adonix reserved words are prohibited. |
| Description (field ZINTITFIC) |
|
Enter the description of the relevant record. This long description is used as a title in screens and reports. |
Tab General
Located in this tab is the general information relative to the table and its management.
Characteristics
| Activity code (field CODACT) |
|
The Activity Code and the Module that are used to identify if the table described in the dictionary must be created in the database of the folder. It is if the two conditions set out below are achieved simultaneously :
A table with an assigned activity code starting with X, Y, or Z, is considered to be specific/custom and in no case affected by a version change (these activity codes can be placed at the line level). In addition, there is a dependence between the modules :
|
| Module (field MODULE) |
Table management
| Database type (field TYPDBA) |
|
Base type for which the table must be generated. The "Folder" base type is used to indicate to the program for the management of folders to generate the table in the base type entered in the folder record for all the files of the folder. In certain exceptional cases (in particular if it is an external table) there is the possibility to add another parameter. |
| Compatible with previous version (field FLG130) |
|
This check box is to be set if there is a requirement to access a table for a v140 folder from a v130 folder. In this case, the structure of this table must be respect the limits for version 130 (no clob, nor blob...). Note : the inverse is possible without specify in the dictionary (access to a table 130 from a v140 folder). |
| Number of records (field NBENREG) |
|
The number of records field is used to define the size of the table in the database. This field is used to size the table being created or modified. This value is entered on the creation of the folder for each table created, from the result of the evaluation of the sizing formula. This formula itself uses variables where the values are entered in the folder parameters. During the revalidation of a folder, the number of records is re-evaluated, but the result of the calculation is only re-written in this field if it is greater than the value found in the table ; thus, it is possible to modify this value, increase the size of the table and this value will be recovered in the case of folder revalidation. If however, it is decreased in size, it will be taken into account immediately if the table is manually validated with the help of the corresponding button, but once a revalidation of the folder is carried out, the calculated value that is greatest, will be used in place of the entered value. This behaviour has been defined for security reasons : for performance reasons and ease of use, it is in fact better to over size a table rather than under size it. It is not necessary to protect the modification of this field with an activity code. |
| Generate translated text (field GENTRA) |
|
This check box is used to define the method used, in Crystal Report, for the translated texts in this table.
It is a parameterization field that does not require an activity code to protect it. Needs to be in coherence with the technique used in the Crystal report linked to the table. For new texts to be translated, it is advised to check this box, to use the view method and thus not overload the sequential files. |
| Reset to zero (field ZERO) |
|
This check box is used by the return to zero utility for the movements, which is used to re-zero the movements in a folder (which is used to guard the "fixed" data - products, business partners, accounts, BOMs.... -arising from an entry deleting the movements, documents, invoices, stock movements, WO... - linked by example to a test of a real startup). When this box is checked, the re-zero utility erases all the lines in the table. One of these flags is found in each field (when a field must be reset to zero without the table being emptied). |
| Open access (field SECURE) |
|
This check box is used to restrict the access to the data table within the folder owning the table and certain authorized folders. This notion is identical for the view. A modification of this field requires a revalidation of the table, to be taken into account in the database.
The authorized folders are :
It should be noted that this check box is not updated by patch : the security strategy for the table being considered as parameterization. On the validation of the table, the fact that this check box is checked provokes the creation of a configuration file (extension .cfg) with the following code :
If other manual directives exist in the configuration file, they are of course respected. The directives can be in effect added by update of the Configuration file section in the corresponding tab of the table management). |
Folder management
Specific columns
Tab Fields
This tab is used to define all the fields of the table in a drop-down menu.
In each table, it is possible to use fields whose name is standardized and which will automatically be updated if they exist by object management. The fields are the following:
CREDAT and UPDDAT are respectively the creation and last update dates.
CRETIM and UPDTIM are respectively the creation and last update times.
CREUSR and UPDUSR are the user codes who carried out respectively the record creation and its last update.
EXPNUM is a sequential number used to date the records with respect to the import/export module (that makes it possible to only export that which has been updated since the last export).
A sixth field can also be inserted in each table. This field is called ENAFLG and it corresponds to an active/inactive flag. If the table in question is managed by an object and that a data type is associated with this fields, the following controls will be made of the fields of this type:
the standard selection window for the object called by the selection key will automatically filter inactive records.
an error message will prevent the direct entry by its inactive key code.
This is of course not valid for the management of the object itself (if not, it would not be possible to reactivate the records rendered temporarily inactive).
Grid
| No. (field NUMLI) |
| Column (field CODZONE) |
|
Define the field name for the table as it will be expressed in the software. A field with the name FIELDNAME defined in an ABV abbreviation table can be accessed using the [F:ABV]FIELDNAME syntax. For custom/specific fields, the field name must start with X_, Y_, or Z_. In the database, each zone corresponds to one or more fields, according to whether or not the zone is sized. The corresponding fields are called FIELDNAME_0, FIELDNAME_1, FIELDNAME_2. To enter and display the corresponding field on a screen, it is given the same name in the screen dictionary. The screen and the table will be used simultaneously in object management. |
| Type (field CODTYP) |
|
The field type is defined here, which characterize the entry format (numeric, any characters, date...) and the coherence controls (reference to a table for example). The principal generic types that exist : A : Alphanumeric |
| Menu (field NOLIB) |
|
Defines the local menu number associated with the field defined on the line. When a field is of the type local menu (from 1 to 255) corresponding to the rank of a title in a table named local menu, stored in the messages table APLSTD. On entry or on display, the following are displayed according to the choices made in the user interface :
The interest of this type of entry is that the list of choices is displayed in the user connection language. Each local menu number characterises the list of available titles. For example, the local menu 1 corresponds to the choice No / Yes in this order. In this particular case, the user interface can also be a check box. |
| Length (field LONG) |
|
Used to define the length of a field when this field uses a generic data type where the length is not fixed. This is notably the case for the types A and DCB. |
| Act (field CODACT) |
|
An activity code is used to:
If the activity code is disabled:
|
| Dim. (field DIME) |
|
Dimension of the field in the table. The dimension can also be assigned as a function of the activity code. |
| Normal title (field INTITCOURT) |
|
Title for the field over three lengths : short title being limited to 12 characters, normal title at 20 characters and the long title at 35 characters. These titles are translatable texts and they are stored in a dedicated table, ATEXTE. When a new text is entered, after creation of a section, a window appears whose title is Text. There is then a choice between the following three options :
When in modification mode for a text already entered there is also an additional choice of displaying in the window, where the title is presented Text nnn (nnn being its number). Indeed, it is then possible to modify the text whose number is given, to conform with the text that is being entered (this modification is made wherever the corresponding text is used, once the corresponding screens have been revalidated). In addition, it is possible to call, using the right button on the mouse, the Abbreviation function that is used to select one of the standardised abbreviations defined when a title is too long (the use of abbreviations must be avoided as far as possible to facilitate the readability of the screens). |
| Abbreviated title (field INTITABREG) |
|
Title for the field over three lengths : short title being limited to 12 characters, normal title at 20 characters and the long title at 35 characters. These titles are translatable texts and they are stored in a dedicated table, ATEXTE. When a new text is entered, after creation of a section, a window appears whose title is Text. There is then a choice between the following three options :
When in modification mode for a text already entered there is also an additional choice of displaying in the window, where the title is presented Text nnn (nnn being its number). Indeed, it is then possible to modify the text whose number is given, to conform with the text that is being entered (this modification is made wherever the corresponding text is used, once the corresponding screens have been revalidated). In addition, it is possible to call, using the right button on the mouse, the Abbreviation function that is used to select one of the standardised abbreviations defined when a title is too long (the use of abbreviations must be avoided as far as possible to facilitate the readability of the screens). |
| Long title (field INTITLONG) |
|
Title for the field over three lengths : short title being limited to 12 characters, normal title at 20 characters and the long title at 35 characters. These titles are translatable texts and they are stored in a dedicated table, ATEXTE. When a new text is entered, after creation of a section, a window appears whose title is Text. There is then a choice between the following three options :
When in modification mode for a text already entered there is also an additional choice of displaying in the window, where the title is presented Text nnn (nnn being its number). Indeed, it is then possible to modify the text whose number is given, to conform with the text that is being entered (this modification is made wherever the corresponding text is used, once the corresponding screens have been revalidated). In addition, it is possible to call, using the right button on the mouse, the Abbreviation function that is used to select one of the standardised abbreviations defined when a title is too long (the use of abbreviations must be avoided as far as possible to facilitate the readability of the screens). |
| Options (field OPTION) |
|
These options are realized by characters that can be concatenated when several options are required. It is possible to choose these options thanks to a selection window. A detailed description for all the possible options is available. |
| Linked table (field LIEN) |
|
Code for a table linked to that modified by means of the current field. For the data types making reference to an object, this field is assigned automatically.
|
| Link expression (field EXPLIEN) |
|
This field is only entered if a linked table has been specified. If this field is not assigned, the link is made directly from the field in the current line (which supposes that the primary linked table key is not the only component). In the case where the primary key possesses several components the link expression must be indicated under the form : comp1;comp2;comp;... where comp1,comp2, comp3,... are the components of the key.
|
| Copy legislation (field CHPLEG) |
|
This field is linked with the checkbox Copy legislation. In effect, it specifies the field containing the legislation, or the field linking up to the master table that contains the legislation. |
| Cancellation (field ANNUL) |
|
During the cancellation of a line in the linked table (source table), a particular action can be carried out on the table that is currently being modified or created (destination table). This action is defined by the code below :
|
| Verification (field VERIF) |
|
This field is used to indicate if the coherence verification utility must verify the link. |
| Mandatory (field OBLIG) |
|
The field Mandatory is used to define if the field can be empty or if it is mandatory that it contains a value (not empty). An empty field may be a string with an empty length, a null numeric value, a local menu value equal to zero (no choice carried out) or an empty date [0/0/0]. When the field is a key in a table, if the cancellation control is set to the RTZ value, the link cannot be mandatory (because the cancellation can erase the value of the key field) : the Mandatory field is then automatically set to No. |
| RTZ (field ZERO) |
|
This field makes it possible to zero the field in the utility"Folder - return to zero". |
Tab Index
This tab is used to define the different indexes defined in the table.
Grid Index
| No. (field NUMLIG) |
| Index code (field CODIND) |
|
This field corresponds to the name under which the index is known in the database. A standard is used in all the tables in the application : it consists of naming the keys by using the abbreviation for the table, followed by 0 for the principal key, by 1 for the second key, etc.... For the specific/customization, start this code with one of the following three letters : X,Y or Z. |
| Index descriptor (field DESCRIPT) |
|
This is where the list of fields that make up the index are entered. The fields are separated by a '+' if there are several fields (for example, in the sites table FACILITY there is a key whose definition is LEGCPY+FCY). A descending sort field is preceded with the sign "-" (warning, it is used in the left list). The first field that makes up the index is without a sign and is therefore ascending. |
| Duplicates (field HOMONYM) |
|
This column is used to define whether the key can or cannot accept homonyms. |
| Default clustered index (field DEFORDIND) |
| Specific clustered index (field ORDIND) |
| Activity (field CODACT) |
|
If this field is not assigned, the index will always be present. If this field corresponds to an inactive activity code, the index will not be generated. It is possible to add a specific/custom key by an activity code starting with X, Y or Z. |
Block number 2
| Default clustered index disabled (field ORDINDSTA) |
Configuration file
| field FICCFG |
|
A text describing the technical configuration of the table in the database is entered in this section. This text is recorded in a file "name.cfg" in the FIL directory for the application. This file is used by the "valfil" instruction. View the dedicated technical annex for more information. |
Tab Audit
This tab is used to create the setups allowing it to then log by means of database triggers generated automatically, the insertions, deletions and modifications carried out on a table, by storing, if required, the values before and after in specific fields. Any record modification is logged provided one of the field conditions is verifies. This trace is stored in two specific tables (AUDITH and AUDITL). It can be simply consulted, or give rise to automated notifications, by means of the Workflow.
The main principle is as follows:
- Provided at least one audit flag (creation, modification, deletion) is checked, each operation of this type creates a line in the AUDITH table. This is made without considering that the fields are logged and the corresponding modifications are made.
- As soon as the fields are listed in the field grid, any modification of the field value respecting the given condition triggers the creation of a line in AUDITL.
The "trigger" method makes it possible to log operations even if they are carried out by a program other than adonix. The information in this tab is taken into account by revalidating the table: the triggeres are automatically created and/or modified at the same time.
The SUBTRIGGER processing contains the trigger description depending on the database. The SPETRIGGER processing is dedicated to the specific in order to customize their description.
The information in this tab is considered as part of the setups. The standard does not supply any audit setup. It is not necessary to safeguard by activity code X, Y or Z any modification made in this tab.
The audit is globally conditioned by the AUDIT activity code.
Following cannot be audited:
- the audit tables themselves
- the fields of type clob and blob
- the fields whose data type is AXX
The results of the audit can be viewed using following functions:
Type of audit
Functions
Tracking key
Grid Fields audited
| All the fields |
|
In the Audit tab, is used to load the grid using all the fields in the table. |
Constraints to respect
There are constraints when creating a table. The limits are the following:
concerning the key:
- limited to 15 indexes at a maximum.
- limited to 16 fields maximum by index.
- limited to 250 characters maximum by index.
concerning the record:
- Under SQL, the limit is 8,060 bytes.
Under Oracle, there is no limit; but under Adonix, the limit has been fixed to 32K - limit of 255 fields per table
- limit of 512 columns ( field1*dimension1 + field2*dimension2 + ... + fieldN*dimensionN )
- limit to either a blob or clob type field of any size, or to several fields, but in this case the total size of the table is limited to 64 Kb.
number of open tables:
- limit of 255 tables.
Reports
By default, the following reports are associated with this function :
DICOX3 : Table dictionary
ATABLIST : List of tables
This can be changed using a different setup.