---
title: Data types
related:
  - https://docs.kentico.com/documentation/developers-and-admins/customization/field-editor/add-custom-data-types.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

All data types assignable via the field editor must be explicitly registered. The system uses the metadata provided during registration to:

- Generate the database columns storing the values of individual fields
- Configure code generator and field editor behavior
- Perform value conversions (and object mapping for complex types) when transferring data to and from the database

Not every data type is offered everywhere. Each data type declares the kinds of objects whose fields can use it, so the set of options in the field editor differs between content types, reusable field schemas, system tables, and custom module classes. For details, see [Data type configuration](https://docs.kentico.com/documentation/developers-and-admins/customization/field-editor/add-custom-data-types.md#data-type-configuration).

The following table highlights important data types registered by default:

| Field editor name          | C# data type             | Database representation                                                                                      | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Boolean (Yes/No)           | bool                     | [bit](https://docs.microsoft.com/en-us/sql/t-sql/data-types/bit-transact-sql)                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Integer number             | int                      | [int](https://docs.microsoft.com/en-us/sql/t-sql/data-types/int-bigint-smallint-and-tinyint-transact-sql)    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Long integer number        | long                     | [bigint](https://docs.microsoft.com/en-us/sql/t-sql/data-types/int-bigint-smallint-and-tinyint-transact-sql) |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Decimal number             | decimal                  | [decimal](https://docs.microsoft.com/en-us/sql/t-sql/data-types/decimal-and-numeric-transact-sql)            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Date                       | DateTime                 | [date](https://docs.microsoft.com/en-us/sql/t-sql/data-types/date-transact-sql)                              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Date and time              | DateTime                 | [datetime2](https://docs.microsoft.com/en-us/sql/t-sql/data-types/datetime2-transact-sql)                    | Time values are stored in the time zone of the server where the application is running. However, the administration UI automatically converts and displays time in the local time zone of each user, based on browser and environment settings.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Time interval              | TimeSpan                 | [time](https://docs.microsoft.com/en-us/sql/t-sql/data-types/time-transact-sql)                              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Text                       | string                   | [nvarchar](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)            | This data type is not intended to store rich text content (formatted text that includes links, e.g., created using the [rich text editor](https://docs.kentico.com/documentation/business-users/rich-text-editor.md)) – use the _Rich text (HTML)_ data type instead. Database field length is configurable when creating or editing fields (up to the database maximum).                                                                                                                                                                                                                                                                                                                                                             |
| Long text                  | string                   | [nvarchar(max)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)       | This data type is not intended to store rich text content (formatted text that includes links, e.g., created using the [rich text editor](https://docs.kentico.com/documentation/business-users/rich-text-editor.md)) – use the _Rich text (HTML)_ data type instead.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Rich text (HTML)           | string                   | [nvarchar(max)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)       | Represents rich text content created with the [rich text editor](https://docs.kentico.com/documentation/business-users/rich-text-editor.md). This data type also ensures that usage of content items is tracked correctly.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Unique identifier (GUID)   | Guid                     | [uniqueidentifier](https://docs.microsoft.com/en-us/sql/t-sql/data-types/uniqueidentifier-transact-sql)      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Content item asset         | ContentItemAssetMetadata | [nvarchar(max)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)       | Binary data attached to a content item.<br>This data type is only available in fields of reusable [content types](https://docs.kentico.com/documentation/developers-and-admins/development/content-types.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Pages and reusable content | IEnumerable              | [nvarchar(max)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)       | Represents a collection of [content items](https://docs.kentico.com/documentation/business-users/content-hub.md) and [pages](https://docs.kentico.com/documentation/business-users/website-content.md) referenced by a specific content type field.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Media files (obsolete)     | IEnumerable              | [nvarchar(max)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)       | Represents a collection of media files. This data type has been sunset along with media libraries and will soon be removed. See [Media library migration](https://docs.kentico.com/guides/architecture/media-libraries-migration-guidance.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Emails                     | IEnumerable              | [nvarchar(max)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)       | Represents a collection of emails from an email channel, referenced by a specific field. For example, chosen by the [email selector component](https://docs.kentico.com/documentation/developers-and-admins/customization/extend-the-administration-interface/ui-form-components/reference-admin-ui-form-components.md).<br>This data type is only available in fields of system tables and custom module classes.                                                                                                                                                                                                                                                                                                                    |
| Pages                      | IEnumerable              | [nvarchar(max)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)       | Represents a collection of [pages](https://docs.kentico.com/documentation/business-users/website-content.md) from the content tree of a selected website channel. For example, chosen by the [page selector component](https://docs.kentico.com/documentation/developers-and-admins/customization/extend-the-administration-interface/ui-form-components/reference-admin-ui-form-components.md).                                                                                                                                                                                                                                                                                                                                      |
| Headless items             | IEnumerable              | [nvarchar(max)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)       | Represents a collection of [headless items](https://docs.kentico.com/documentation/business-users/headless-content.md) from a headless channel. For example, chosen by the headless item selector component.<br>This data type is only available in fields of headless [content types](https://docs.kentico.com/documentation/developers-and-admins/development/content-types.md).                                                                                                                                                                                                                                                                                                                                                    |
| Smart folder               | SmartFolderReference     | [uniqueidentifier](https://learn.microsoft.com/en-us/sql/t-sql/data-types/uniqueidentifier-transact-sql)     | Represents a [smart folder](https://docs.kentico.com/documentation/business-users/content-hub/content-hub-folders.md#smart-folders) selected via the [Smart folder selector component](https://docs.kentico.com/documentation/developers-and-admins/customization/extend-the-administration-interface/ui-form-components/reference-admin-ui-form-components.md#smart-folder-selector).<br>This data type is only available in fields of reusable and website [content types](https://docs.kentico.com/documentation/developers-and-admins/development/content-types.md), and in fields of [reusable field schemas](https://docs.kentico.com/documentation/developers-and-admins/development/content-types/reusable-field-schemas.md). |
| Taxonomy                   | IEnumerable              | [nvarchar(max)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)       | Represents a collection of tags selected via the [tag selector component](https://docs.kentico.com/documentation/developers-and-admins/customization/extend-the-administration-interface/ui-form-components/reference-admin-ui-form-components.md#tag-selector).<br>This data type is only available in fields of [content types](https://docs.kentico.com/documentation/developers-and-admins/development/content-types.md) and [reusable field schemas](https://docs.kentico.com/documentation/developers-and-admins/development/content-types/reusable-field-schemas.md).                                                                                                                                                          |
| Object code names          | IEnumerable              | [nvarchar(max)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)       | Represents a collection of object code names selected via the [object code name selector component](https://docs.kentico.com/documentation/developers-and-admins/customization/extend-the-administration-interface/ui-form-components/reference-admin-ui-form-components.md).<br>This data type is not available in fields of headless [content types](https://docs.kentico.com/documentation/developers-and-admins/development/content-types.md).                                                                                                                                                                                                                                                                                    |
| Object global identifiers  | IEnumerable              | [nvarchar(max)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql)       | Represents a collection of object GUIDs selected via the [object guid selector component](https://docs.kentico.com/documentation/developers-and-admins/customization/extend-the-administration-interface/ui-form-components/reference-admin-ui-form-components.md#object-selector).<br>This data type is not available in fields of headless [content types](https://docs.kentico.com/documentation/developers-and-admins/development/content-types.md).                                                                                                                                                                                                                                                                              |

> **Note:** **No referential integrity for linked objects**
>
> The system doesn't maintain the referential integrity of objects linked via the _Pages and reusable content_, _Media files_, _Emails_, _Pages_, and _Object code names_ data types. Custom code must account for the referenced objects no longer existing or being otherwise invalid.

## Extend the default set of data types

When none of the default data types fits the data you need to store, you can register your own. A custom data type declares its own C# type, database representation, and conversion functions, and becomes assignable via the field editor like any built-in type. See [Add custom data types](https://docs.kentico.com/documentation/developers-and-admins/customization/field-editor/add-custom-data-types.md).
