BSON Storage Format - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

BSON is a binary storage format for JSON data. The BSON specification is located at https://bsonspec.org/. BSON maintains the overall structure of JSON text data, but encodes data type, variable length, and nesting information. BSON is designed to be lightweight so there is little additional overhead as compared to text-based JSON in terms of storage. BSON 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 the following additional data types:
  • Binary data
  • Floating point
  • Date
  • Timestamp
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 imported or exported as text is UNICODE.

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