What do DBMS and RDBMS mean, and what does a relational DBMS add?
ReportedSource: GeeksforGeeks interview experience: Amazon Data Engineer
DBMS: any software managing stored data. RDBMS: a DBMS using tables related by keys, queried with SQL, with constraints, normalization, ACID transactions and a query optimizer.
DBMS (database management system). Software that stores, retrieves and manages data and controls concurrent access. The data model can be anything: hierarchical, network, document, key-value, files.
RDBMS (relational DBMS). A DBMS based on the relational model: data lives in tables (relations) of rows and columns, and tables are related through keys. Examples: PostgreSQL, MySQL, Oracle, SQL Server.
What the relational model adds.
- Declarative SQL with joins across tables.
- Integrity constraints: primary keys, foreign keys, UNIQUE, CHECK, NOT NULL.
- Normalization to remove redundancy.
- ACID transactions and concurrency control as standard features.
- Query optimizer that chooses the execution plan.
Where non-relational fits. Document stores (MongoDB), key-value stores (Redis) and wide-column stores (Cassandra) trade some of these guarantees or the join model for flexible schemas or horizontal scale. A good answer says when you would pick each.
See the concept: Atomic publication
BEGIN TRANSACTION;
- 1Close and insert customer versions
- 2Upsert orders, sales, payments
- 3Insert batch ledger row
- 4Advance watermark
COMMIT: batch published
Committed watermark
Moves forward only after COMMIT.