Overview Transactions and concurrency control ensure that a database remains in a consistent state even when multiple users are modifying data simultaneously. This is critical for preventing data corruption and ensuring reliability. Core Concepts Transaction: A logical unit of work that must be completed entirely or not at all (Atomicity). Concurrency Problems: Dirty Read: Reading…
Overview Relational databases (RDBMS) store data in structured tables with predefined schemas. They are based on the relational model of data and use Structured Query Language (SQL) for data manipulation and retrieval. Core Concepts Tables, Rows, and Columns: Table: A collection of related data (e.g., Users). Row (Tuple): A single record in a table. Column…
Overview NoSQL (“Not only SQL”) databases are non-relational data stores that provide flexible schemas and horizontal scalability. They are designed to handle large volumes of unstructured or semi-structured data. Core Concepts Data Models: Document Store: Stores data as documents (e.g., JSON/BSON). Great for content management. (e.g., MongoDB). Key-Value Store: Simple map of keys to values.…
Overview Indexing is a data structure technique used to quickly locate data without having to search every row in a database table. An index is like a table of contents for a database, storing a sorted version of a column’s values and a pointer to the original row. Core Concepts B-Trees (Balanced Trees): The most…