Build the mental model
Stepping back from any single technology, it helps to see where each major database sits on the map.
PostgreSQL and MySQL are both general-purpose relational databases. This site has a PostgreSQL course but not yet a MySQL one - conceptually they play a similar role. Neither is a universal winner.
SQLite is an embedded, file-based relational database - not a network server. The next lesson goes deeper.
MongoDB represents the document-database approach and Redis represents the key-value/caching approach - both covered in their own dedicated courses on this site.
Supabase Database is a managed platform built on PostgreSQL; its hands-on depth lives in the Cloud Providers & Platforms course's Supabase lesson.
| System | Role |
|---|---|
| PostgreSQL | General-purpose relational database - continue to the PostgreSQL course for depth |
| MySQL | General-purpose relational database, similar role to PostgreSQL - no dedicated course on this site yet |
| SQLite | Embedded, file-based relational database - continue to the next lesson in this course |
| MongoDB | Document database - continue to the MongoDB course for depth |
| Redis | Key-value store / cache - continue to the Redis course for depth |
| Supabase Database | Managed PostgreSQL plus auth, storage, and APIs - continue to the Supabase lesson in Cloud Providers & Platforms |
DATABASE SYSTEMS LANDSCAPE
--------------------------
RELATIONAL DOCUMENT KEY-VALUE
PostgreSQL, MySQL MongoDB Redis
(server, general use) (flexible docs) (cache, fast lookups)
SQLite
(embedded, single-file, no server process)
MANAGED PLATFORM
Supabase Database (managed PostgreSQL + auth, storage, APIs)Connect it to a real scenario
Need a general-purpose relational database? PostgreSQL (or MySQL) is a safe default. Need one that ships inside your app with no server? SQLite fits that role.
Need to store content that doesn't fit rigid tables? Look at MongoDB. Need blazing-fast lookups for sessions, caches, or leaderboards? Redis is built for that.
If you want to skip infrastructure work with a managed Postgres that bundles authentication and instant APIs, evaluate Supabase Database.
The runnable example below turns this checklist into a small function.
Try the working example
function suggestSystem(need) {
const map = {
"general web app relational data":
"PostgreSQL (or MySQL) - general-purpose relational database. Continue: the PostgreSQL course.",
"embedded mobile app storage":
"SQLite - embedded, file-based database. Continue: this course's SQLite lesson.",
"flexible document data":
"MongoDB - document database. Continue: the MongoDB course.",
"fast cache/session store":
"Redis - key-value store. Continue: the Redis course.",
"managed Postgres with built-in auth":
"Supabase Database - managed PostgreSQL plus extras. Continue: the Supabase lesson in Cloud Providers & Platforms.",
};
return map[need] || "Not on this map yet - describe the need more specifically.";
}
[
"general web app relational data",
"embedded mobile app storage",
"flexible document data",
"fast cache/session store",
"managed Postgres with built-in auth",
].forEach((need) => console.log(`${need} ->`, suggestSystem(need)));general web app relational data -> PostgreSQL (or MySQL) - general-purpose relational database. Continue: the PostgreSQL course.
embedded mobile app storage -> SQLite - embedded, file-based database. Continue: this course's SQLite lesson.
flexible document data -> MongoDB - document database. Continue: the MongoDB course.
fast cache/session store -> Redis - key-value store. Continue: the Redis course.
managed Postgres with built-in auth -> Supabase Database - managed PostgreSQL plus extras. Continue: the Supabase lesson in Cloud Providers & Platforms.
All five example needs map cleanly to a system and the course to continue to for depth.5-minute try-it
Add a new key to suggestSystem's map object for "graph-shaped relationships (social network)" and suggest a graph database for it.
One important caution
Declaring PostgreSQL or MySQL an absolute "winner" over the other
Thinking of Supabase Database as an entirely separate product unrelated to PostgreSQL
Wikipedia: Comparison of relational database management systems — How Databases Work