Databases for Full Stack Developers
Databases store application data durably. PostgreSQL is the main relational choice, using tables, SQL, indexes and transactions. ORMs such as Prisma or Drizzle map tables to code and manage schema migrations, while MongoDB and Redis serve document storage and fast key-value caching.
Stage: Backend and Data · Part of the Full Stack Developer roadmap · Last reviewed 19 November 2026
What to learn in Databases
- Write SQL joins, aggregates and filters against related tables
- Add an index and confirm its effect with EXPLAIN
- Define a schema and run a migration with an ORM
- Wrap related writes in a transaction
- Cache a result in Redis with an expiry time
Databases interview questions
What does a database index do and what is its cost?
An index is a data structure, usually a B-tree, that lets the database find rows by a column without scanning the whole table. The cost is extra storage and slower inserts and updates, because every index must be maintained.
When would you pick MongoDB over PostgreSQL?
MongoDB fits data that is naturally nested documents with changing shape, accessed mostly as a whole. PostgreSQL is better when data is relational, needs joins, constraints and multi-row transactions. Many apps start with PostgreSQL, which also supports JSON columns.
Where Databases fits in the Full Stack Developer roadmap
Databases belongs to the Backend and Data stage (beginner level), which takes about 9 hours. Services, APIs and storage.
Other units in this stage
Back to the full Full Stack Developer roadmap