Data model

Following tables represents a storage structure of Data Model and View entities.

Data model

MetadataEntity

This table contains main information about Data Model (Table in Database) Item.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
Caption nvarchar(1024) NOT NULL Name of the Data Model item
IsSystem bit NOT NULL 1 - mean that this item is system. Use this sign to divide Data Model items created by user (0) and required for proper functioning of a system (1).
TableName nvarchar(128) Table name in a database
SchemaName nvarchar(30) NOT NULL Schema name in a database
PrimaryKeyType tinyint NOT NULL Obsolete, not using in current version
Comment nvarchar(max) NULL Description of a Data Model item
IsDeleted bit NOT NULL 1 - mean that record was logically deleted
IsView bit NOT NULL 1 - mean that Data Model item represented by SQL View in a database
IsSupportsOptimisticLock bit NOT NULL 1 - mean that Optimistic Lock is enabled for the Data Model
VersioningType tinyint NOT NULL Type of Data Model In terms of versioning.0 - No versioning1 - Data Model is base entity. (Invoice for example)2 - Data Model is child/dependent entity. (Invoice detail for example)3 - Data Model is version itself.
IsAvailableForImportExport bit NOT NULL 1 - mean that the Data Model is availiale to export to a exchange format (excel for example) and for import from the exchange format.

MetadataEntityAttribute

This table contains main information about Data Model's (Columns in Database) attributes.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
Caption nvarchar(1024) NOT NULL Name of the attribute
EntityId uniqueidentifier NOT NULL Reference on a record in MetadataEntity table
IsSystem bit NOT NULL 1 - mean that this item is system. Use this sign to divide Data Model's attributes created by user (0) and required for proper functioning of a system (1).
TypeId tinyint NOT NULL Type of the attribute in terms of storing.0 - Column1 - Foreign key
IsDisplayedInGrid bit NOT NULL Obsolete, not using in current version
Comment nvarchar(max) NULL Description of the Attribute
IsDeleted bit NOT NULL 1 - mean that record was logically deleted
CustomCaption nvarchar(1024) NULL Obsolete, not using in current version
Purpose tinyint NOT NULL Purpose of the attribute0 - Common attribute1 - Primary key2 - Version column for optimistic lock3 - Parent id for hierarchical tables4 - File download field5 - File token. Obsolete.6 - For version records. Id of the entity for which was created version7 - For version records. Id of the base entity for which was created version8 - For version records. Version from.9 - For version records. Version to.10 - Logical delete sign.
IsParentId bit NOT NULL Obsolete, not using in current version
IsVirtual bit NOT NULL 1 - mean that the Attribute is virtual and not present in a database
IsCalculated bit NOT NULL 1 - mean that the Attribute is calculated column in a database
ListId uniqueidentifier NULL Reference on a record in MetaList table
ColumnName nvarchar(128) NOT NULL Column name in a database
IsNullable bit NOT NULL 1 - mean that the Attribute is nullable
Type nvarchar(128) NULL Database type of the attribute
DefaultValue nvarchar(1024) NULL Default value of the attribute
IsCreateConstraint bit NOT NULL Obsolete, not using in current version
IsUpdateCascade bit NOT NULL Obsolete, not using in current version
IsDeleteCascade bit NOT NULL Obsolete, not using in current version
ReferencedEntityId uniqueidentifier NULL In a case of foreign key attribute is the reference on MetadataEntity

MetadataEntityAttributeType

This table contains dictionary of two attribute types. 0 - Column 1 - Foreign key. It may be removed in next versions.

MetaList

This table contains lists - a simple key-value dictionaries.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
Name Name nvarchar(50) NOT NULL Name of the List
List nvarchar(max) NOT NULL Dictionary description in following format: key1=value1\r\nkey2=value2\r\n...

MetadataColumnType

This table contains mapping between database type -> .NET CLR Type -> Java script client type. For example: bit -> System.Boolean -> bool, varbinary(max) -> System.Byte[] -> string

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
Name nvarchar(254) NOT NULL Database type name
ViewName nvarchar(255) NOT NULL Java script client type name
CLRName nvarchar(255) NOT NULL .NET CLR type name

MetaView

This table contains main information about View Item.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
Name nvarchar(50) NOT NULL Name of the View item
MasterEntityId uniqueidentifier NOT NULL Reference on MetadataEntity table. It defines the entity of the view is inherited
Comment nvarchar(max) NULL Description of a View item
IsDeleted bit NOT NUL 1 - mean that record was logically deleted
Caption nvarchar(max) NULL Secondary name of the View. Using in UI.
DefaultSort nvarchar(max) NULL Sort expression on SQL

MetaViewColumn

This table contains main information about Viewsl's columns (attributes).

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
MetaViewId uniqueidentifier NOT NULL Reference on a record in View table
AttributeId uniqueidentifier NOT NULL Reference on a record in MetadataEntityAttribute table
AllowShow bit NOT NULL 1 - mean that attribute will be shown in UI
AllowEdit bit NOT NULL 1 - mean that attribute will be editable in UI
CustomCaption nvarchar(1024) NULL Name of the attribute in UI
ParentId uniqueidentifier NULL Id of parent attribute. Not null for attributese from referenced table
SortOrder int NULL It defines the order in UI
Width nvarchar(50) NULL It defines the width of the UI element (control) in UI
MetaViewForSelectId uniqueidentifier NULL Reference on a record in View table. It defines a view whch will be used as selector for referenced entities
CustomFormat nvarchar(255) NOT NULL Defines a format string for display the value of the attribute. In ExtJS format
CustomEditor nvarchar(255) NOT NULL Defines a custom editor for the attribute. In ExtJS format
AlowImportExport bit NOT NULL 1 - mean that the arribute will be used in exchange (Excel) format.
AllowCompare bit NOT NULL 1 - mean that the arribute will be used to compare records while loading from exchange (Excel) format
ContextHelp nvarchar(255) NULL Attribute description used for the context help generation

ExternalMethod

This table contains main information about Functions.

For the functions contained in the dll, the following column are used Id, Name, Type, MethodName, ReturnType, AssemblyName, FullType, ReturnFullType.

For the functions defined as code, the following column are used Id, Name, MethodName, ClassName, UsingText, CodeText.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
Name nvarchar(256) NOT NULL Name of the function
Type nvarchar(max) NULL Type where the function is implemented.
MethodName nvarchar(1024) NOT NULL Name of the method which implement the function
ReturnType nvarchar(max) NULL Name of the returning type of the function
AssemblyName nvarchar(max) NULL Name of the assembly which contain the type
ClassName nvarchar(max) NULL Name of the class which contain the type
FullType nvarchar(max) NULL Full name of the type where the function is implemented.
ReturnFullType nvarchar(max) NULL Full name of the returning type of the function
UsingText nvarchar(max) NULL Code of the using section in method definition
CodeText nvarchar(max) NULL Code of the methos

ExternalMethodOpType

This table contains list of using types of functions.

Column name Column type Purpose
Id tinyint NOT NULL Primary key
Name nvarchar(50) NOT NULL Name of the type
ObjectType tinyint NOT NULL 0 - this type is avaliable for View1 - this type is avaliable for Form

MetaViewExternalMethod

This table contains binding between View object and Function.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
MetaViewId uniqueidentifier NOT NULL Reference on a record in View table
ExternalMethodId uniqueidentifier NOT NULL Reference on a record in ExternalMethod table
TypeId tinyint NOT NULL Reference on a record in ExternalMethodOpType table0 - Filter1 - After request2 - Before update3 - After update4 - Before create5 - After create6 - Before deleted7 - After deleted8 - Init for copy9 - Init for create
Params nvarchar(max) NULL Parameters which passed to function as dictionary
Order int NOT NULL It defines the order of execution of functions