-
Book Overview & Buying
-
Table Of Contents
Getting Started with DuckDB
By :
DuckDB offers a range of nested, or composite, data types. In contrast to single-valued data types such as INTEGER and VARCHAR, nested data types are characterized by being able to store multiple values in the form of sequences of values and structures containing multiple named-property values. These nested types can contain further nested types, allowing hierarchical data to be modeled within each row of a table. This makes them a natural fit for modeling different kinds of semi-structured data within DuckDB. In this section, we’ll introduce a selection of DuckDB’s nested data types: LIST, MAP, and STRUCT.
A DuckDB LIST is an ordered sequence of values that all have the same data type. When used as the type of a column, each row must share the same data type for each LIST instance; however, lists can have variable lengths across rows. A LIST literal is represented as a comma-separated list of values, wrapped in square...