JSON Data Type (Universal Binary Format) - Teradata Database

Teradata Database Design

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
Product Category
Software

JSON Data Type (Universal Binary Format)

The JSON data type can be stored in universal binary (UBJSON) format. Specify UBJSON with the optional STORAGE FORMAT clause in the data type specification syntax. UBJSON data is stored in an optimized format, depending on data size:

 

Column Size

Storage Location

≤ 64 KB (64,000 bytes)

All rows are stored in the table.

> 64 KB (64,000 bytes)

Storage depends on the JSON data size:

  • JSON data ≤ 4 KB (4,096 bytes) is stored in the table.
  • JSON data > 4 KB (4,096 bytes) is stored in a LOB subtable.
  • A table may have some JSON data rows (stored in the UBJSON format) that are stored in the base table and others that are stored in a LOB subtable.

    If there is no column length specified, the default length is the maximum. The maximum total size is 16 MB (16,776,192 bytes).

    Note: The maximum size for UBJSON reflects the number of bytes in the data. This is different than the case for JSON text, where the maximum size reflects the number of characters in the data.