Learn SQL first. SQL (relational) databases store data in tables with fixed schemas and strong transactions, and they're used almost everywhere. NoSQL databases such as MongoDB store flexible documents and suit changing data shapes. Once you know SQL, learning NoSQL is quick, and many real apps use both.

SQL vs NoSQL at a glance

SQL (relational)NoSQL (e.g. document)
Data modelTables with rows and columnsDocuments, key-value pairs, wide columns or graphs
SchemaDefined up frontFlexible
RelationshipsJoins across tablesUsually embedded or referenced documents
TransactionsStrong (ACID) by designVaries by database
Scaling styleTraditionally vertical, with sharding optionsOften designed for horizontal scaling
ExamplesPostgreSQL, MySQLMongoDB, Redis, Cassandra, Neo4j
Good forPayments, orders, accounts, reportingProfiles, content, catalogues, caching, feeds

Why learn SQL first?

  • Most business and analytics data lives in relational databases.
  • SQL is a stable, widely used language, and the skills transfer between databases.
  • Concepts such as keys, normalisation and transactions teach you to think clearly about data.

When should you choose NoSQL?

Choose a document database when your data is naturally document-shaped and changes often (user profiles with optional fields, product catalogues), when you need a fast cache or session store (Redis), or when you're modelling connections (graph databases). A common real-world design uses PostgreSQL for payments and accounts, MongoDB for content, and Redis for caching.

Databases in Program Zero

Phase 3 covers relational design and normalisation, SQL (joins, subqueries, window functions), PostgreSQL or MySQL, MongoDB, Redis and ORMs. The project is a full database schema for a WhatsApp-like and Instagram-like app, which you then build in the full-stack phase.