View profile

Database Engine Primer - Software Shots by Karn - Issue #2

Database Engine Primer - Software Shots by Karn - Issue #2
By Karn • Issue #2 • View online
Well, we have a new name, software shots. I have been into databases for a while now, so thought of writing about database engines in this weekly shots. I’ll try to keep it short.

figma to the rescue :P
figma to the rescue :P
Alright! So Database Engine is nothing but a library that takes care of the disk storage and CRUD operations, like create, update and delete on the actual disk. This can be as simple as a key-value store, or as rich and complex as full support ACID and transactions with foreign keys.
When you insert some values into a table, there are a lot of layers and the lowest layer comprises of taking your data and flushing it to a disk, whether it’s an SSD or a normal hard drive (spinning wheel, right?). Most of the databases have merged this with the management system (DBMS), but recently this has started being divided into two parts.
  1. Actual work to store on the disk.
  2. Features that get built on top of the engine like server, replication, isolation, store procedures, etc.
So if you want to write a new database, you don’t have to start from scratch, just pick up an engine and then write your own database on top of it. You can design your DB to fit a single good use case rather than using a general-purpose database out there. For example, you’re storing logs, which requires better “writes” than “reads” as you’ll rarely look at them. Sometimes database engine is also referred to as Storage Engine.
Some DBMS gives you the flexibility to switch engines like MySQL & MariaDB whereas some come with a built-in engine that you can’t change like Postgres. There are pros and cons to each, so you need to understand the use case and then make a decision.
Here’s a link to Uber’s Engineering blog on why they shifted from Postgres to MySQL:
Why Uber Engineering Switched from Postgres to MySQL | Uber Engineering Blog
One of the reasons is definitely the ability to switch engines. You can create a table with one engine, and then create another table with a completely different engine. And that is attractive.
Let me know if you found this useful by forwarding this email to your friends who might be interested in subscribing to Weekly Software Shots. Have a happy week :)
Last week in Did you have a look at X?
Ten Digits
Strict Mode for your Continuous Testing | bors-ng
Did you enjoy this issue?
Karn
By Karn

I build and create things. As of now, I work as a Software Engineer at SendX/SendPost.

If you don't want these updates anymore, please unsubscribe here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Powered by Revue
Gyan Karn, Delhi, India - 110039