Stage 2 · Lesson 4 of 6
JSON columns for the flexible parts
Many apps have mostly fixed data plus a flexible corner: product attributes that differ by category, user settings, raw webhook payloads. You do not need a second database for that. has a jsonb type that stores JSON in a binary form you can query with operators such as ->> and @> and index with a .
MySQL has a JSON type and can index values through . Keep the fields you filter, join or sort on often as real columns, and put the varying extras in a JSON column. You get flexible data and in one place.
Common trapthe opposite extreme: one table with an id and a giant JSON blob, which throws away and makes every query harder.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CoursePaidGrokking Relational Database Design and Modeling
Design Gurus · Intermediate · $98 one-time
Data modelling, ER diagrams, keys and normalisation for the relational default, with worked designs
- GuideFreePostgreSQL Tutorial
PostgreSQL Global Development Group · Beginner
The short official tutorial: create a database, tables and your first queries in an evening
Practise
Keep handy
Also worth your time
json versus jsonb, the operators and how to index JSON for fast lookups
- Sefism SQL and Databases RoadmapGo deeper
The full Sefism roadmap for SQL: queries, schema design, transactions, indexes and SQL from code