Database

System Design

Database

What is Database?

What is Database?

A database is a collection of data stored in a specific way so as to allow efficient storage and retrieval of data.

A Database Management System(DBMS) is software that interacts with a database providing an interface for creating, modifying, and querying a database. Examples of DBMS include SQL Server, MySQL, PostgreSQL, Oracle, and MongoDB.

Types of Database Management Systems (DBMS)

There are hundreds of databases that have different properties and are optimized for special functionalities. It’s difficult to group the databases, however, when we look at the structure imposed on the data we can come up with two main groups: relational and non-relational databases.

  1. Relational Databases

  2. Non-Relational Databases

Choosing a Database

Always keep in mind the following factors when choosing a database for a new application:

  1. Data model - Consider the structure of your data and how it will be stored and retrieved. If your data is highly structured and requires complex relationships, a relational database like MySQL or PostgreSQL may be a better fit. If your data is unstructured or semi-structured, a NoSQL database like MongoDB or Cassandra may be more appropriate.

  2. Scale - How much data do you expect to store and how quickly do you need to retrieve it? If you expect to store a large amount of data and need to scale horizontally, a NoSQL database may be better suited for your needs.

  3. Performance - Consider the performance requirements of your application. Some databases are better suited for high-write workloads, while others are optimized for high-read workloads.

  4. Availability and durability - Consider how important it is for your application to be available and how you will ensure data durability. Some databases offer built-in replication and fault tolerance, while others require additional setup and configuration.

  5. Transactions - The ACID properties in relational databases give you a guarantee of data atomicity, consistency, isolation, and durability when dealing with transaction operations.

  6. Cost - Consider the total cost of ownership, including licensing, hardware, and maintenance costs.

It’s important to note that there is no one-size-fits-all solution and the best database for your application will depend on your specific requirements. When engineering at scale is all about trade-offs. Effortless horizontal scalability in NoSQL databases comes with a hidden cost. It’s important to dive deep to find out where that cost is hiding.

Whenever you're ready

There are 4 ways we can help you become a great backend engineer:

The MB Platform

Join 1000+ backend engineers learning backend engineering. Build real-world backend projects, learn from expert-vetted courses and roadmaps, track your learnings and set schedules, and solve backend engineering tasks, exercises, and challenges.

The MB Academy

The “MB Academy” is a 6-month intensive Advanced Backend Engineering BootCamp to produce great backend engineers.

Join Backend Weekly

If you like post like this, you will absolutely enjoy our exclusive weekly newsletter, Sharing exclusive backend engineering resources to help you become a great Backend Engineer.

Get Backend Jobs

Find over 2,000+ Tailored International Remote Backend Jobs or Reach 50,000+ backend engineers on the #1 Backend Engineering Job Board