Join Sheeri Cabral for an in-depth discussion in this video Nested dynamic columns, part of Understanding MariaDB for MySQL Users.
…MariaDB allows you to nest dynamic columns.…That means that one of the parts of a dynamic column can itself be…a dynamic column.…In our items table, we have CDs and DVDs, both of which have subparts.…A CD has songs and a DVD has chapters.…What if we want to represent chapters and songs as dynamic…columns within the dynamic column of extra that we already have?…MariaDB allows you to do this.…
Remember that you use COLUMN_ADD to add a new part to an existing dynamic column and…COLUMN_CREATE to create a new dynamic column type.…Before we add chapters to our DVD,…let's do a quick refresh of the extra dynamic column for our DVD.…So let's SELECT COLUMN_JSON of extra FROM items WHERE type equals DVD.…We have one dynamic column part called in stock, with a value of 10.…So, to add chapters to our DVD, we could write a query like this.…
UPDATE items SET extra equal to, and here we're going to use COLUMN_ADD so…that we preserve the existing dynamic column part while we add a new part.…So we're adding the new part to extra and…
- Why use dynamic columns?
- Creating, updating, and querying dynamic columns
- Installing the CONNECT storage engine
- Connecting to remote data
- Connecting to CSV, INI, and XML files
- Using PIVOT tables
- Accessing database metadata
- Working with the Cassandra storage engine
Skill Level Intermediate
1. Dynamic Columns
2. The Power of CONNECT
3. Advanced CONNECT Storage Engine
4. The Cassandra Storage Engine
Next steps1m 46s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.