Skip to main content

Dictionaries in database


The dictionaries are stored in the database in four tables:

  1. DIC_ATTRIB – contains dictionary attributes.
  2. DIC_ITEM – table containing definitions of dictionary objects.
  3. DIC_LOCALIZATION – contains localized information about objects.
  4. DIC_REFERENCE – table containing definitions of views.

DIC_ATTRIB

ColumnPropertiesDescription
DIA_IDPK, uniqueidentifier, not nullID assigned during attribute creation
DIA_DICSTR_IDPK, FK, uniqueidentifier, not nullStructure ID
DIA_PARENT_IDFK, uniqueidentifier, not nullParent element ID
DIA_TYPE_IDFK, uniqueidentifier, not nullType definition element ID
DIA_DICSTR_TYPE_IDFK, uniqueidentifier, not nullStructure ID containing elements that are types
DIA_VAL_AS_STRnvarchar(max), nullAttribute value as a string
DIA_VAL_NUMnumeric(19,4), nullAttribute value of type decimal
DIA_VAL_STRnvarchar(max), nullAttribute value of type string
DIA_VAL_DATdatetime, nullAttribute value of type DateTime
DIA_VAL_GUIDuniqueidentifier, nullAttribute value of type GUID
DIA_VAL_DICSTR_IDFK, uniqueidentifier, nullStructure ID containing elements
DIA_VAL_DICOBJ_IDFK, uniqueidentifier, nullSelected element ID
DIA_VAL_BLOBvarbinary(max), nullAttribute value of type Binary
DIA_VALID_FROMdatetime, not nullAttribute validity FROM (default in archITekt Studio - 1900-01-01)
DIA_VALID_TOdatetime, not nullAttribute validity TO (default in archITekt Studio - 2099-12-31)
DIA_ACTIVEbit, not nullIs the attribute active
DIA_INDEXbit, not nullAttribute index

DIC_ITEM

ColumnPropertiesDescription
DII_IDPK, uniqueidentifier, not nullDictionary object ID
DII_DICSTR_IDPK, uniqueidentifier, not nullStructure ID to which the dictionary object belongs
DII_NAMEnvarchar(max), not nullName
DII_DESCRIPTIONnvarchar(max), not nullDescription
DII_TYPEchar(1), not nullObject type. Available types: C – category, I – element, V – view
DII_PARENT_IDFK, uniqueidentifier, nullParent object ID
DII_DICSTR_PARENT_IDFK, uniqueidentifier, nullParent structure ID
DII_VALID_FROMdatetime, not nullDefines the validity of the dictionary object FROM (default in archITekt Studio - 1900-01-01)
DII_VALID_TOdatetime, not nullDefines the validity of the dictionary object TO (default in archITekt Studio - 2099-12-31)
DII_ACTIVEbit, not nullIs the dictionary object active
DII_INDEXbit, not nullIndex

DIC_LOCALIZATION

ColumnPropertiesDescription
DIL_DICSTR_IDFK, uniqueidentifier, not nullStructure ID
DIL_DICT_OBJECT_IDPK, FK, uniqueidentifier, not nullDictionary object ID
DIL_LANGUAGEPK, varchar(10), not nullLanguage
DIL_NAMEvarchar(256), not nullName in the given language
DIL_DESCRIPTIONvarchar(256), not nullDescription in the given language

DIC_REFERENCE

ColumnPropertiesDescription
DIR_IDPK, uniqueidentifier, not nullID
DIR_VIEW_IDFK, uniqueidentifier, not nullView ID
DIR_DICSTR_VIEW_IDFK, uniqueidentifier, not nullStructure ID that contains the view
DIR_OBJECT_IDFK, uniqueidentifier, not nullElement ID that belongs to the view
DIR_DICSTR_OBJECT_IDFK, uniqueidentifier, not nullStructure ID that contains the element belonging to the view
DIR_INDEXint, not nullIndex

SQL Views​

SQL views were created to simplify the use of dictionaries. The view extracts structured data from the database without requiring knowledge of the relationships between database tables within the dictionaries. There is no need to write a script to retrieve category elements along with their attributes.

Example of a dictionary with a category having an SQL view:

image

To retrieve elements of the "Application Status" category along with their attributes using the SQL view, you need to execute the following query:

SELECT * FROM [dict].[ApplicationStatus]

The query will return the following data. You can use syntax suggestion and press CTRL+Space to search for a specific dictionary category.

image

See also​

Importing the structure from the text file

Categories

Data elements