🗄️ BS ISO/IEC 13249 is the SQL multimedia and application packages (SQL/MM) standard developed by ISO/IEC JTC 1/SC 32 and adopted by the British Standards Institution (BSI) as a UK national standard. This batch includes ISO/IEC 13249-1:2016 (Framework) and ISO/IEC 13249-3:2016 (Spatial), defining the standard framework for expressing multimedia and spatial data as SQL user-defined types (UDTs) supporting SQL calling conventions.
💡 The contribution of SQL/MM is to “objectify” complex types within relational databases: encapsulating multimedia and spatial semantics as user-defined types plus routines, so the SQL language itself can express text, image, audio, and geospatial data.
1. Series Overview and Positioning 📌
SQL/MM is an extension of the SQL standard (ISO/IEC 9075) providing standard data-type definitions for multimedia and application-oriented complex data. The series comprises several parts: Part 1 defines the framework; Part 2 full-text search; Part 3 spatial; Part 4 still images; Part 5 data mining; Part 6 text mining; Part 7 history; and more. The Framework and Spatial parts in this batch are the foundation and core of the series.
| Standard | Title | Year | Core Content |
| BS ISO/IEC 13249-1:2016 | Framework | 2016 | SQL/MM structure, general conventions for data types and routines, user-defined type framework |
| BS ISO/IEC 13249-3:2016 | Spatial | 2016 | Spatial data types, spatial reference systems, geometric operations and spatial predicates |
⚠️ Parts 1 and 3 of this series replace their 2007 and 2011 editions respectively. The SQL/MM spatial part is closely related to the OGC Simple Features standard and ISO 19107 — check terminology consistency when citing.
2. Framework (Part 1) 🧱
Part 1 defines the overall framework of SQL/MM:
- Structure: the organisation, namespaces, and conformance issues of the SQL/MM parts.
- Data types and routine conventions: general conventions for user-defined types, routines, type hierarchies, and behaviour.
- Terminology: terms drawn from the SQL standard (ISO/IEC 9075) and this framework.
- Concepts: the abstract data-type concepts introduced by SQL/MM and their relationship to SQL.
💡 The framework is the “common contract” of the parts: every SQL/MM part follows the UDT and routine conventions defined by the framework, ensuring cross-part type consistency and extensibility.
3. Spatial Part (Part 3) 📍
Part 3 defines standard data types and operations for expressing and managing spatial data:
- Spatial data types: points, lines, surfaces, geometry collections, expressed as user-defined types.
- Spatial reference systems: coordinate systems, projections, and units; terms drawn from ISO 19111.
- Geometric operations: intersection, union, difference, buffer, distance, and other spatial operations.
- Spatial predicates: determining relationships between geometries (e.g. intersects, contains, disjoint).
| Category | Typical Objects/Operations | Application |
| Geometry types | ST_Point, ST_LineString, ST_Polygon | Map-feature representation |
| Spatial operations | ST_Intersection, ST_Buffer, ST_Distance | Spatial analysis |
| Spatial predicates | ST_Contains, ST_Intersects, ST_Within | Spatial queries |
| Reference systems | Geographic, projected coordinates | Position representation and transformation |
4. Key Technical Requirements ⚙️
- SQL/MM types shall be implemented as user-defined types following the framework’s routine conventions.
- Spatial types shall support the defined spatial reference systems, with explicit coordinate precision and units.
- Spatial operations and predicates shall guarantee the correctness of geometric results and topological consistency.
- Cross-part references shall follow the naming and calling conventions of the SQL standard (ISO/IEC 9075).
⚠️ Topology and coordinate precision are common pitfalls in spatial data: projection selection, unit conversion, and coordinate rounding can introduce spatial error. Unify the reference system and set appropriate precision when building the database and querying.
5. Engineering Practice 🛠️
- GIS and map services: store and query geographic features with spatial types.
- Logistics and route planning: use spatial predicates for area analysis and nearest-neighbour queries.
- Urban and facility management: manage spatial objects such as pipelines, roads, and land parcels.
- Multimedia applications: combine full-text, image, and other parts for rich-media data management.
6. Frequently Asked Questions ❓
❓ Q: What is SQL/MM?
A: SQL/MM is an extension of the SQL standard providing standard data-type definitions for multimedia and application-oriented complex data — spatial, full-text, image, data mining, and more.
❓ Q: What is the role of the Framework (Part 1)?
A: The framework defines the common conventions for the SQL/MM parts — user-defined types, routines, type hierarchies, and conformance requirements — acting as the parts’ “common contract”.
❓ Q: How does the spatial part represent geographic data?
A: With point, line, and surface spatial types for geometric features, combined with spatial reference systems and spatial operations/predicates for storage, querying, and analysis.
🔍 Q: How does SQL/MM spatial relate to OGC Simple Features?
A: SQL/MM spatial is closely related to the OGC Simple Features standard and ISO 19107 terminology, all aiming to standardise SQL representation and querying of spatial data.