Complex Data Types

As relational database adoption increased in the 1980s, the need for additional types became apparent. Ex: A spatial type might represent a single point as an X and Y value. Ex: A composite type representing a full name might contain three simple types representing first, middle, and last names. Newer types like spatial and composite have a rich internal structure and are called complex data types.

Most complex types fall into one of four categories:

  • Collection types include several distinct values of the same base type, organized as a set or an array.

  • Document types contain textual data in a structured format such as XML or JSON.

  • Spatial types store geometric information, such as lines, polygons, and map coordinates.

  • Object types support object-oriented programming constructs, such as composite types, methods, and subtypes.