Skip to the workspace
Pebellslearn by building
Learn the Basics  ›  Lesson

RDBMS Benefits and Limitations

RDBMS Benefits and Limitations 12 minRelational systems trade flexibility for guarantees: transactions, constraints and open-ended querying, at the cost of fixed schemas and harder horizontal scaling.

sql / RDBMS Benefits and Limitations

Explore each scene at your own pace.

01 · The rule

The rule

RDBMS Benefits and Limitations

Relational systems trade flexibility for guarantees: transactions, constraints and open-ended querying, at the cost of fixed schemas and harder horizontal scaling.

Compare integrity guarantees, query needs and operational tradeoffs for an application.

A payments team is choosing where to store money transfers. A transfer must take money from one account and add it to another — never just one half. Another team is storing clickstream events: billions of small records a day, never edited. The same database will not be the best answer for both, and knowing why is the point of this lesson.

The rule

Structure buys trust; you pay for it in rigidity and scaling effort.

A relational database management system (RDBMS) such as PostgreSQL, MySQL, SQL Server or SQLite gives you strong guarantees because it insists on structure up front.

What structure buys you:

  • Transactions. Several changes succeed or fail together. Either both halves of the transfer happen, or neither does.
  • Constraints. The database itself refuses bad data: a negative price, an order for a customer who does not exist, two customers with the same id.
  • Flexible questions. Because data is split into clean tables, you can ask questions nobody planned for, joining tables in new ways years later.
  • Maturity. Decades of tooling, backups, replication and people who know it well.

What it costs you:

  • A fixed shape. Every row in a table has the same columns. Changing the shape means a migration, which on a huge table takes planning.
  • Scaling writes is harder. One server can go a long way, but spreading writes across many machines (sharding) is extra work compared with databases built for it.
  • Awkward fits. Data whose shape varies wildly from record to record, or that is naturally a deep tree, can feel forced into rows and columns.
BEGIN;
UPDATE accounts SET balance = balance - 500 WHERE account_id = 1;
UPDATE accounts SET balance = balance + 500 WHERE account_id = 2;
COMMIT;
Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.