> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/gridgain/gridgain-8/architecture/data-distribution.md).

# Data Distribution

How data is distributed and represented in a GridGain cluster, covering data partitioning, affinity colocation, and the key-value and SQL access models.

This section explains how GridGain distributes and represents data across a cluster. It covers the physical organization of data through [data partitioning](/docs/gridgain/gridgain-8/architecture/data-distribution/data-partitioning.md) and [affinity colocation](/docs/gridgain/gridgain-8/architecture/data-distribution/affinity-colocation.md), as well as the two logical representations of data — the key-value cache and SQL tables — described in the [Data Modeling introduction](/docs/gridgain/gridgain-8/architecture/data-distribution/introduction.md).

{% columns %}
{% column %}
{% content-ref url="/pages/04Qv8R1ifaQkBCvVkdOx" %}
[Introduction](/docs/gridgain/gridgain-8/architecture/data-distribution/introduction.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How data is stored and accessed in GridGain, contrasting the physical partitioned layout with the equivalent key-value cache and SQL table views.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/PaxyFkD3txE3Nbr0t9Kk" %}
[Data Partitioning](/docs/gridgain/gridgain-8/architecture/data-distribution/data-partitioning.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How GridGain partitions data across server nodes with the affinity function, the partitioned and replicated cache modes, backups, and partition map exchange.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/dBm8YZ4tZM0Gs3fi7P8j" %}
[Affinity Colocation](/docs/gridgain/gridgain-8/architecture/data-distribution/affinity-colocation.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How affinity colocation stores related cache entries together on the same node so multi-entry queries run locally, and how to configure a custom affinity key.
{% endcolumn %}
{% endcolumns %}
