Types of Databases
Understand the key differences between relational databases and NoSQL systems, including ACID guarantees and scaling approaches. Evaluate common NoSQL models, document, graph, and key-value, and their trade-offs. Choose an appropriate database architecture based on the constraints of the system design problem.
Databases are commonly grouped into two categories: relational and NoSQL (non-relational).
Relational databases
Relational databases enforce a predefined schema before storing data. Data is organized into relations (tables) composed of tuples (rows) and attributes (columns). Each tuple has a unique key. Because data is structured, a tuple in one table can link to a tuple in another using a foreign key.
Structured Query Language (SQL) is used to manage the database, handling data insertion, deletion, and retrieval.
Relational databases are dominant due to their simplicity, robustness, flexibility, and
However, ACID guarantees can be overkill for some use cases. If an application can tolerate specific anomalies, a custom solution might offer higher performance, though it adds implementation complexity.
The ACID offers the following properties:
Atomicity: Transactions are atomic units. Either all statements in a transaction execute successfully, or none do. Failed transactions are aborted and rolled back. ...