Module 07 of 11

Databases & Persistence

Lessons

About This Module

A game server that forgets everything when it restarts isn't much of a game. Player accounts, inventories, progress, match history, and leaderboards all have to be saved somewhere safe, and read back quickly enough that players never notice the wait. That's what persistence is for.

This module introduces the databases you'll see most often in game backends. SQL and PostgreSQL are a strong fit for player data and transactions that must never be lost or duplicated. Redis keeps data in memory for sessions, caching, and live leaderboards. MongoDB offers a flexible document model for things like game logs and changing item data.

There's no single right database for a game. Many studios combine two or three, using each where it fits. Once you know where your data will live, you're ready for Matchmaking & Lobbies, the next module.

Lessons

4 videos
01

SQL Tutorial - Full Database Course for Beginners

A long, beginner-friendly course on relational databases and SQL, covering how to design tables, write queries, and model data such as players and matches.

02

PostgreSQL in 100 Seconds

A fast overview of PostgreSQL, a popular open-source relational database well suited to player accounts and transactions.

03

Redis in 100 Seconds

A quick look at Redis, the in-memory data store used for caching, sessions, and real-time leaderboards.

04

MongoDB in 100 Seconds

A short introduction to MongoDB and the document model, and how it differs from SQL databases.