> 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/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle.md).

# MBR (Minimum Bounding Rectangle)

Learn about Minimum Bounding Rectangles (MBR) in MariaDB Server. This section details how to calculate and use MBRs for spatial indexing and efficient querying of geometric data.

{% columns %}
{% column %}
{% content-ref url="/pages/WGj5GGkOnQ97TMAs23g6" %}
[MBR Definition](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbr-definition.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Understand Minimum Bounding Rectangles. An MBR is the smallest rectangle that completely encloses a geometry, defined by its minimum and maximum X and Y coordinates.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/5ObqxZmHkMVv1ayosCkY" %}
[MBRContains](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrcontains.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Check if one MBR contains another. Returns 1 if the Minimum Bounding Rectangle of the first geometry completely encloses the MBR of the second geometry.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/zMTF1pFWU9wWWLnGZvkQ" %}
[MBRCoveredBy](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrcoveredby.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Check if one MBR is covered by another. Returns 1 if the MBR of the first geometry is entirely contained within the MBR of the second geometry.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/j27CAwGJ6IkvB4aqT7vN" %}
[MBRDisjoint](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrdisjoint.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Check if two MBRs are disjoint. Returns 1 if the Minimum Bounding Rectangles of the two geometries do not intersect or touch at all.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/hA48hsMiI9eOGWrRvMbh" %}
[MBREqual](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrequal.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Check if two MBRs are identical. Returns 1 if the Minimum Bounding Rectangles of both geometries share the exact same coordinates.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/OIT66rocK9pwY2gmOHeJ" %}
[MBRIntersects](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrintersects.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Check if two MBRs intersect. Returns 1 if the Minimum Bounding Rectangles of the geometries share any portion of space, including boundaries.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/Jm5aFCnMrGLmuUohVany" %}
[MBROverlaps](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbroverlaps.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Check if two MBRs overlap. Returns 1 if the MBRs intersect but neither completely contains the other, and they have the same dimension.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/jEitDeIhZF7mY4W9V371" %}
[MBRTouches](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrtouches.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Check if two MBRs touch. Returns 1 if the MBRs intersect only at their boundaries and do not share any interior points.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/LSJB3ydHaXuVRY5B6Ggt" %}
[MBRWithin](/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrwithin.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Check if one MBR is within another. Returns 1 if the MBR of the first geometry is completely enclosed by the MBR of the second geometry.
{% endcolumn %}
{% endcolumns %}

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>
