Chapter 6. Dynamic Columns

In this chapter, we will examine the problem of storing non-homogeneous data in the same table. The first part will discuss the approaches traditionally used in relational databases. The following part will examine a MariaDB feature which solves the problem in a totally different way: dynamic columns.

We will discuss the following topics in this chapter:

  • The problem of storing non-homogeneous data
  • Dynamic columns functions
  • Nested dynamic columns
  • Indexing dynamic columns

The problem: storing non-homogeneous data

In our database, we have a table called product. We defined it such that it only contains very generic attributes, like the product's id, name, price, the available quantity, and a description. But we will also need ...

Get MariaDB Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.