Structures and databases

D2000 system defines the term structure as particular number of named items, to which it is possible to specify the properties as value type, start value, saving start value, limits. Structure in the system is defined by an object Structure definition, so a specific name is assigned to it. Structure definition (holds no value) represents particular model, which is used (by the form of reference) in definition of other objects:

Object of Structured variable type is closely associated with an object of Structure definition type. It defines non-zero number of rows of values. Structure of each row is given by an object of Structure definition type. A value matrix is created:

Example:
The object SD.PersonDef of Structure definition contains the following items:

Item name Item type
Name Text
Age Integer
Born Absolute time
Children Integer

The object SV.Persons is Structured variable type and contains five (5) rows. Rows of this objects are defined by the object SD.PersonDef. Object value includes of twenty (20) values [5 x 4] of various types, arrangement of which is shown in the following table:

Row/Column Name Age Born Children
1        
2        
3        
4        
5        

Each item represents one value, for which there are defined (and especially for each value) all usual properties in D2000 system (start value, limits, status bits etc.). Individual values can be displayed in pictures, used in expressions (SV.Persons[3]^Age), in eval tags or events.

Using an object of Database type, it is possible to access a SQL database (via the interface ODBC), structure of which (names and types of columns) corresponds to an object of Structure definition type.

For each column (item) at the level of an object of Structure definition it is possible to define the following attributes:

  • Name*
  • Description*
  • Value type*
  • Status text (for displaying)
  • Limits
  • Start value
  • Index of transformation palette

These properties are used (or they are not, according to configuration) for columns in object of Structured variable and Database types. For object of Structured variable type, these properties can be configured for each item (value) individually.

* Attribute is defined at the level of object of Structure definition type and cannot be changed.

Napíšte komentár