Page History

Versions Compared

Key

This line was added.

This line was removed.

Formatting was changed.

Each anonymous type can be described with a DataType description. A DataType description is an instance, containing strict (and compact) definition of the anonymous type. An anonymous type and its DataType description are isomorphic - each anonymous type has one description and each description has one anonymous type. An anonymous type can be restored from its description; a description can be restored from its anonymous type.

Note that not only the anonymous types can have DataType descriptions – each STSdb 4.0 supported type can be described with DataType description (not all types - only supported by the engine). Unlike the anonymous types, the user types and their descriptions are not isomorphic - if we have a description we cannot recover the original user type (unless if it is anonymous).

Each table, no matter portable or direct, stores two descriptions - for the key and for the record. The descriptions are stored in the table descriptor (table meta-info). The DataType descriptions make possible opening a table with different but equivalent user types. The descriptions are used for internal checks, for fast and compact serialization and deserialization of the user types, for easy describing and querying the sub-types etc. In short, the DataType description is an anonymous definition of the supported database .NET type.

When the user opens a table with anonymous types he must provide key and record DataType descriptions:

When the user opens a table directly with his types, he does not need to provide key and record descriptions – they are internally created from the provided user types and are kept in the table’s descriptor.