Send Feedback
Skip to content

Data Structures Overview

This page provides an overview of the core data structures in q, including their structure, dimensions, and typical usage.

In q, the following data structures exist:

Name Dimension Definition Example
Atom 1x1 A single, indivisible value of a specific type. 3.14
List/Array n x 1 An ordered, zero-indexed sequence of values, which can be uniform or mixed type. 1 2 3
Dictionary n x 2 A key-value mapping that associates a list of keys with a list of values. ("Alice; "Bob"; "Mike")!30 25 43
Table n x m A collection of named, equal-length columns stored as a flipped dictionary. ([] name:`Alice`Bob; age:30 25)
Keyed Table (n x k) + (n x m) A dictionary mapping a table of key columns to a table of value columns. ([id:1 2] name:`Alice`Bob; age:30 25)