Lesson 1.2 of the free SQL course on SQLtest.online

There are many types of databases, each optimized for a specific kind of data, query pattern, or scalability requirement. In this lesson you'll learn the main database models - relational, key-value, document, wide-column, graph, time-series, and columnar - with their key differences, typical use cases, and examples of real systems. For each type, you'll also see what the same online store data looks like in it.

Types of Databases: Relational, NoSQL and Beyond

In the previous lesson, we introduced the general idea of a database and a DBMS. In practice, not all databases are built the same way. Different database types are optimized for different kinds of data, query patterns, scalability requirements, and consistency needs.

We will also take a closer look at relational databases, because they will remain our main focus throughout this course.

Database types: the same order as a relational table and as a JSON document, key-value, wide-column, graph and in-memory databases, columnar analytical and time-series databases

Why Are There Different Types of Databases?

No single database design is perfect for every application.

For example:

  • A banking system needs strong consistency and reliable transactions.
  • A caching system needs extremely fast key lookups.
  • A social network may need flexible document storage and graph-style relationship analysis.
  • An analytics platform may need to scan billions of values efficiently for reporting.

Because different systems solve different problems, several database models have emerged over time.

The full lesson also covers:

  • Main Types of Databases: Comparison Table
  • Relational Databases
  • Key-Value Databases
  • Document Databases
  • Wide-Column Databases
  • Columnar Analytical Databases
  • Graph Databases
  • Time-Series Databases
  • In-Memory Databases
  • How to Choose the Right Database Type
  • Summary: Key Differences Between Database Types
  • Frequently Asked Questions
  • Interview Questions

👉 Read the full lesson 1.2 and practice SQL right in your browser, on real MySQL, PostgreSQL, SQL Server and other engines: Types of Databases on SQLtest.online

This is part of a free SQL course on SQLtest.online: short lessons with tasks you run in the browser, from your first SELECT to window functions.