# Data structures overview

_This page provides an overview of the core data structures in q, including their structure and dimensions._

q provides the following data structures:

| Name | Nr of Elements | Definition | Example |
| ---- | ---- | ---- | ---- |
| [Atom](atoms.md) | $1$ | A single, indivisible value of a specific type. | `3.14` |
| [List](lists.md) | $n \times 1$ | An ordered, zero-indexed sequence of values of uniform or mixed type, also called an array. | `1 2 3` |
| [Dictionary](dictionaries.md) | $n \times 2$ | A key-value mapping that associates a list of keys with a list of values. | `` ([Alice: 30; Bob: 25; Mike:43]) `` |
| [Table](tables.md) | $n \times m$ | A list of conforming dictionaries. | `` ([] name:`Alice`Bob; age:30 25) `` |
| [Keyed table](keyed-tables.md) | $n \times (k + m)$ | A dictionary mapping a table of key columns to a table of value columns. | `` ([id:1 2] name:`Alice`Bob; age:30 25) `` |

You can build custom data structures from the basic data structures:

| Name | Nr of Elements | Definition | Example |
| ---- | ---- | ---- | ---- |
| [Table dictionary](table-dictionary.md) | $\left(\sum_{i=1}^{s} n_i\right) \times m$ | A dictionary of tables, in which the key is a unique list and the values are tables (typically sorted by time). | `` (`u#`Alice`Bob)! `` 
 ``(([] time: `s#08:01 16:28; event: `login`logoff); ([] time: `s#08:02 08:29 17:02; event: `login`alarm`logoff)) `` |
