BSON Storage Format - Advanced SQL Engine - Teradata Database

JSON Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
uwa1591040057999.ditamap
dita:ditavalPath
uwa1591040057999.ditaval
dita:id
B035-1150
lifecycle
previous
Product Category
Teradata Vantageā„¢

BSON is a binary storage format for JSON data. The BSON specification is located at http://bsonspec.org/. BSON maintains the overall structure of JSON text data, but it encodes data type, variable length, and nesting information. It is designed to be lightweight so there is little additional overhead as compared to text-based JSON in terms of storage. It is easily traversable and efficient in terms of the time needed to convert to and from BSON.

The standard data types for JSON are as follows:
  • Object
  • Array
  • String
  • Number
  • null
  • Boolean
BSON provides some additional data types, including the following:
  • Binary data
  • Floating point
  • Date
  • Timestamp
You should use the BSON storage format in the following cases:
  • When exchanging data with MongoDB
  • When retrieval of portions of the document is more important than insertion time
  • When compactness of storage is not as important as retrieval speed

BSON encodes strings in the UTF-8 character set. The character set for BSON data when it is imported or exported as text is UNICODE.

Numeric types are always serialized in little-endian format. If data is imported to or exported from the database in the BSON format (via constructor/instance methods or cast expressions), it is expected to be in this format.