---
title: "You don't need NoSQL (use MySQL)"
url: "https://aaronfrancis.com/videos/you-dont-need-nosql-use-mysql"
path: "/videos/you-dont-need-nosql-use-mysql"
type: video
author: Aaron Francis
published: 2023-11-03
topic: Databases
keywords: [mysql, json, nosql, relational database, json columns, json indexing, generated columns, json arrays, json objects, json extraction, json querying, planetscale]
youtube_url: "https://www.youtube.com/watch?v=QZBxgX2OWbI"
chunked: true
full_bytes: 32295
section_count: 14
full_url: "/videos/you-dont-need-nosql-use-mysql/full.md"
site_index: "/llms.txt"
keyword_index: "/llms/keywords.txt"
---

# You don't need NoSQL (use MySQL)

## Sections (31.5 KB full document — follow any link to read verbatim)

This page is long enough to hit agent truncation cliffs if fetched all at once. Pick the section matching your question below to read it 100% verbatim (< 35 KB each), or open the [full unsplit document (31.5 KB)](/videos/you-dont-need-nosql-use-mysql/full.md).

### 1. MySQL supports NoSQL (00:00–01:24 · 1.5 KB)
MySQL has robust built-in JSON support for unstructured documents alongside relational data, eliminating the need for a separate NoSQL database.
Keywords: `mysql`, `nosql`, `mysql supports`, `supports nosql`, `supports`, `json`, `nosql database`, `data`
[Read section 1 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/1-mysql-supports-nosql.md)

### 2. When to use JSON (01:24–04:36 · 3.4 KB)
Use JSON for schemas that are dynamic, vary per row or tenant, or contain unstructured data; avoid JSON for well-defined rigid schemas where discrete columns work better.
Keywords: `json`, `mysql`, `json blob`, `blob`, `data`, `column`, `columns`, `structure`
[Read section 2 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/2-when-to-use-json.md)

### 3. JSON versus TEXT columns (04:36–07:20 · 2.6 KB)
JSON columns validate data at insertion and store in binary format for faster access, while TEXT columns allow invalid JSON and require reparsing on each read.
Keywords: `json`, `text`, `versus`, `columns`, `json versus`, `versus text`, `text columns`, `json column`
[Read section 3 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/3-json-versus-text-columns.md)

### 4. Efficient JSON storage (07:21–08:08 · 0.9 KB)
MySQL stores JSON in binary format with structural metadata, avoiding the need to reparse from text on each operation.
Keywords: `json`, `efficient json`, `json storage`, `mysql`, `storage`, `json object`, `object`, `text`
[Read section 4 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/4-efficient-json-storage.md)

### 5. Creating JSON objects with SQL (08:08–11:02 · 2.8 KB)
SQL functions JSON_OBJECT, JSON_ARRAY, and JSON_OBJECT_AGG enable creating JSON structures directly in queries from table data without string concatenation.
Keywords: `json`, `creating json`, `json objects`, `objects`, `sql`, `json object`, `object`, `entity`
[Read section 5 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/5-creating-json-objects-with-sql.md)

### 6. Extracting JSON from the document (11:02–14:56 · 4.1 KB)
JSON_EXTRACT, the arrow (->), and double-arrow (->>) operators pull data from JSON documents with path syntax, using double-arrow as the unquoting shorthand.
Keywords: `json`, `document`, `extracting json`, `extracting`, `json extract`, `json unquote`, `column`, `unquote`
[Read section 6 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/6-extracting-json-from-the-document.md)

### 7. JSON arrays (14:56–17:37 · 2.8 KB)
MySQL supports JSON array indexing with bracket notation including negative indices and ranges, enabling operations like accessing last/second-to-last elements.
Keywords: `json`, `json arrays`, `arrays`, `array`, `expect`, `actually called`, `called network`, `called`
[Read section 7 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/7-json-arrays.md)

### 8. Querying on JSON columns (17:38–19:12 · 1.6 KB)
JSON_CONTAINS_PATH function searches for key existence in JSON documents with ONE or ALL match options, filtering results by presence.
Keywords: `json`, `json columns`, `querying`, `columns`, `json contains`, `contains path`, `contains`, `match`
[Read section 8 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/8-querying-on-json-columns.md)

### 9. Query an array's items (19:12–19:59 · 0.8 KB)
MEMBER OF operator checks if a value exists in a JSON array, allowing queries to filter rows where an array contains a specific item.
Keywords: `array`, `array items`, `query`, `items`, `json functions`, `json`, `hspa`, `member`
[Read section 9 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/9-query-an-arrays-items.md)

### 10. Indexing JSON documents (19:59–22:48 · 2.8 KB)
Generated columns and functional indexes enable indexing JSON keys, while multi-value indexes (MySQL 8.0.17+) index array items for fast array membership queries.
Keywords: `json`, `indexing json`, `json documents`, `mysql`, `database indexing`, `documents`, `index`, `functional index`
[Read section 10 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/10-indexing-json-documents.md)

### 11. Generated columns (22:48–26:23 · 3.3 KB)
Generated columns extract JSON values as top-level columns with GENERATED ALWAYS AS; STORED generated columns write to disk for faster access without touching the JSON blob.
Keywords: `generated columns`, `generated`, `columns`, `mysql`, `column`, `stored generated`, `stored`, `virtual column`
[Read section 11 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/11-generated-columns.md)

### 12. JSON blob storage (26:23–27:09 · 0.7 KB)
Large JSON columns are stored separately from the row with only a pointer in the row; stored generated columns avoid this overhead when frequently accessed.
Keywords: `json blob`, `blob`, `json`, `blob storage`, `storage`, `big blob`, `generated columns`, `jsons`
[Read section 12 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/12-json-blob-storage.md)

### 13. Making JSON invisible (27:09–29:07 · 2.1 KB)
ALTER COLUMN SET INVISIBLE hides JSON columns from SELECT * queries, preventing unnecessary blob transfer while keeping explicit column access available.
Keywords: `json`, `invisible`, `making json`, `json invisible`, `select star`, `blob along`, `json data`, `along`
[Read section 13 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/13-making-json-invisible.md)

### 14. Updating documents in place (29:08–31:23 · 2.3 KB)
JSON_SET, JSON_INSERT, and JSON_REPLACE operate in-place for efficient partial updates without reconstructing entire objects, with JSON_SET being preferred.
Keywords: `updating documents`, `updating`, `documents`, `json`, `json set`, `set attributes`, `entirely new`, `new object`
[Read section 14 verbatim](/videos/you-dont-need-nosql-use-mysql/sections/14-updating-documents-in-place.md)

---

## Related on aaronfrancis.com

- [MySQL for Developers with Aaron Francis](/podcast/mysql-for-developers-with-aaron-francis-n6unbd) *(Podcast · 2023-04-04 · shared: mysql, planetscale, schema design)*
- [Storing feature flags as JSON (with indexing)](/videos/storing-feature-flags-as-json-with-indexing) *(Video · 2023-11-14 · shared: json indexing, mysql, json objects)*
- [Easy database indexing strategies](/videos/easy-database-indexing-strategies) *(Video · 2023-10-26 · shared: generated columns, mysql, planetscale)*
- [You don't always need JOINs](/videos/you-dont-always-need-joins) *(Video · 2023-11-22 · shared: mysql, planetscale, schema design)*
- [Store 8 feature flags in 1 integer (Bitwise operations in MySQL)](/videos/store-8-feature-flags-in-1-integer-bitwise-operations-in-mysql) *(Video · 2023-11-09 · shared: mysql, json columns, planetscale)*

## Relevant Resources from Aaron Francis

- **[MySQL for Developers](https://databaseschool.com)** (overview on site: [/courses](/courses)): Full video course covering MySQL indexing, deferred joins, pagination, query plans, and schema design for application developers.
- **[Mastering Postgres](https://databaseschool.com)** (overview on site: [/courses](/courses)): Deep-dive video course on PostgreSQL indexing, query performance, JSONB, full-text search, locking, and production operations.

## Search aaronfrancis.com (2-Hop Static Keyword Index)

Pick the alphabetical shard matching any topic to find exact pages across all articles, newsletters, videos, talks, and podcast transcripts (every shard is < 40 KB):
[A-B](/llms/keywords/a-b.txt) · [C](/llms/keywords/c.txt) · [D-E](/llms/keywords/d-e.txt) · [F-G](/llms/keywords/f-g.txt) · [H-J](/llms/keywords/h-j.txt) · [K-L](/llms/keywords/k-l.txt) · [M-N](/llms/keywords/m-n.txt) · [O-P](/llms/keywords/o-p.txt) · [Q-R](/llms/keywords/q-r.txt) · [S](/llms/keywords/s.txt) · [T-Z](/llms/keywords/t-z.txt) · [Directory](/llms/keywords.txt) · [Site Map](/llms.txt)

Shards for this page's topics: `mysql` ([M-N](/llms/keywords/m-n.txt)), `json` ([H-J](/llms/keywords/h-j.txt)), `relational database` ([Q-R](/llms/keywords/q-r.txt)), `generated columns` ([F-G](/llms/keywords/f-g.txt)).

## About Aaron Francis (Current Context)

Aaron Francis is VP of Marketing and Community at [Laravel](https://laravel.com), founder of [Try Hard Studios](https://tryhardstudios.com), creator of [Solo](https://soloterm.com), co-host of [Mostly Technical](/podcast), and author of [Mastering Postgres](/courses), [High Performance SQLite](/courses), [MySQL for Developers](/courses), and [Screencasting.com](/courses). Full bio: [/about](/about) · Current focus: [/now](/now).
