concurrency

Pessimistic Concurrency Control - 2PL

Introduction In today's high-traffic database management systems (DBMS), leveraging the full potential of hardware is essential. With the advent of modern CPUs, the opportunity for parallel processing has increased significantly. However, executing m…

Read article
Databases

Query Optimization

Introduction SQL is a declarative language, which means that when you request a query, you specify the data you want, but not how to get it. The database management system (DBMS) is responsible for determining the most efficient way to retrieve the r…

Read article
Databases

Query Execution - Joins

Introduction Joins are used to combine data from multiple tables in a database and retrieve the combined data as a single result set. This allows us to effectively retrieve data that is spread across multiple tables and can be especially useful when …

Read article
query-execution

Query Execution - Aggregations

Introduction Once the query planner has determined the optimal plan for executing a query, it's time to implement that plan. But before we can do that, it's important to understand the algorithms used to execute the various operations in the plan. In…

Read article
hashing-schemes

Understanding hash indexes

Why database indexes? When it comes to querying databases, one of the most time-consuming and performance-intensive operations is to do a linear scan of the entire table. This requires the database management system (DBMS) to retrieve all of the page…

Read article
database

Database Buffer Pool - Part 2

Introduction As explained in Database Buffer Pool - Part 1, a buffer pool is a limited chunk of memory, which means that whenever we bring something from the disk, we need to evict something from the buffer pool and replace it. Buffer replacement is …

Read article
buffer-pool

Database Buffer Pool - Part 1

Introduction In order to allow the database execution engine to perform its operations, it needs the pages containing the table records to be brought from disk to memory. However, we want to optimize I/O operations, so there is a subsystem of the dat…

Read article
Databases

Compression In Databases

Introduction It's well-known that the database's main bottleneck lies in I/O. That's what makes database designers aim toward reducing it in any possible way, one of them is to look carefully at the workload and choose the suitable storage model (for…

Read article
Databases

Storage Models for Databases

Introduction Different applications have different requirements, as discussed in What the heck is OLTP, OLAP?, it depends on business rules to define the workload of our database. Therefore, we need different storage models for the database in order …

Read article
database

What the heck is OLTP, OLAP?

What's OLTP? OLTP stands for Online Transaction Processing, in which a database is used to execute huge amounts of transactions. Transaction means to change data, either by inserting, updating, or deleting small amounts of data. It's usually used at …

Read article