Types of Databases
In this lesson1 sections
Types of Databases
Databases are commonly grouped into two categories: relational and NoSQL (non-relational).
Relational databases
Relational databases organize data into relations (tables), tuples (rows), and attributes (columns). A schema defines the columns and constraints. Define a primary or unique key when rows need an enforced identifier, and use foreign keys to express supported relationships between tables.
Structured Query Language (SQL) is used to manage the database, handling data insertion, deletion, and retrieval.
Relational systems commonly provide SQL queries, constraints, and transactions. The (ACID) properties describe transaction guarantees, but the actual isolation level matters. Do not assume that selecting a relational database automatically prevents every dirty read, lost update, or phantom read.
Choose transaction and isolation requirements from the operations the application must perform. If weaker guarantees are acceptable, compare their cost and behavior explicitly. Avoid replacing a database guarantee with custom logic unless the application can correctly enforce the resulting responsibility.
The rest of this lesson is for Premium members
Premium opens every lesson in this course, along with all questions and solutions on PracHub.