Facebook Instagram Twitter Vimeo Youtube
Sign in
  • Home
  • About
  • Team
  • Buy now!
Sign in
Welcome!Log into your account
Forgot your password?
Privacy Policy
Password recovery
Recover your password
Search
Logo
Sign in
Welcome! Log into your account
Forgot your password? Get help
Privacy Policy
Password recovery
Recover your password
A password will be e-mailed to you.
Saturday, October 11, 2025
Sign in / Join
  • Contact Us
  • Our Team
Facebook
Instagram
Twitter
Vimeo
Youtube
Logo
  • Home
  • News
    • News

      Cloudflare Thwarts Record-Breaking 22.2 Tbps DDoS Attack by Paige Henley

      3 October 2025
      News

      Ransomware Attack Hits Major European Airports via Collins Aerospace Software by Husain Parvez

      3 October 2025
      News

      Steam Pulls Game After Malware Steals Over $150,000 in Crypto by Husain Parvez

      3 October 2025
      News

      Mexican Senate Advances Framework for National Cybersecurity Law by Husain Parvez

      1 October 2025
      News

      CBK Launches Sector-Wide Cybersecurity Centre Amid Rising Attacks by Husain Parvez

      27 September 2025
  • Data Modelling & AI
    • AllBig dataBusiness AnalyticsData ScienceData Structure & AlgorithmDatabasesVector DatabaseDeep LearningEthical HackingGenerative AIMachine Learning
      Big data

      From Word2Vec to LLM2Vec: How to Choose the Right Embedding Model for RAG

      8 October 2025
      Big data

      How to Debug Slow Search Requests in Milvus

      4 October 2025
      Big data

      When Context Engineering Is Done Right, Hallucinations Can Be the Spark of AI Creativity

      2 October 2025
      Big data

      Getting Started with langgraph-up-react: A Practical LangGraph Template

      14 September 2025
    • Big data
    • Business Analytics
    • Databases
    • Data Structure & Algorithm
    • Data Science
    • Deep Learning
    • Ethical Hacking
    • Generative AI
    • Machine Learning
    • Security & Testing
  • Mobile
    • AllAndroidIOS
      Android

      Google experiments with faster app launch shortcut on Pixel

      11 October 2025
      Android

      YouTube gives banned creators a second shot, but with a catch

      11 October 2025
      Android

      Pebble sets the stage for its comeback with the revival of its app store

      11 October 2025
      Android

      The Pixel Watch 4 shines with its repairability score that’s through the roof

      11 October 2025
    • Android
    • IOS
  • Languages
    • AllAjaxAngularDynamic ProgrammingGolangJavaJavascriptPhpPythonReactVue
      Languages

      Working with Titles and Heading – Python docx Module

      25 June 2025
      Languages

      Creating a Receipt Calculator using Python

      25 June 2025
      Languages

      One Liner for Python if-elif-else Statements

      25 June 2025
      Languages

      Add Years to datetime Object in Python

      25 June 2025
    • Java
    • Python
    • Ajax
    • Php
    • Python
    • Golang
    • Dynamic Programming
    • React
    • Vue
    • Java
    • Javascript
    • NodeJS
    • Angular
  • Guest Blogs
  • Discussion
  • Our Team
HomeData Modelling & AIBig data10 Must-Know Database Types for System Design Interviews
Big dataGuest Blogs

10 Must-Know Database Types for System Design Interviews

Algomaster
By Algomaster
28 June 2025
0
1
Share
Facebook
Twitter
Pinterest
WhatsApp

    10 Must-Know Database Types for System Design Interviews

    Ashish Pratap Singh's avatar

    Ashish Pratap Singh
    May 27, 2025
    ∙ Paid

    Choosing the right database is one of the most critical decisions you’ll make in a system design interview.

    The database you pick often dictates how well your system performs under load, how easily it scales, and how gracefully it handles complexity in real-world scenarios.

    That’s why a strong understanding of different database types and when to use each is a key part of acing system design interviews.

    In this article, we’ll walk through the 10 must-know database types for system design interviews. For each one, we’ll explain:

    • What it is

    • When to use it (with examples)

    • Key design considerations

    • Popular databases you can mention in interviews


    1. Relational

    A Relational Database stores data in structured tables with rows and columns. It’s like an Excel sheet, but much more powerful.

    Each table represents an entity (like Users, Orders, or Products), and relationships between tables are defined using foreign keys. It uses SQL (Structured Query Language) to query and manipulate data.

    When to use it

    Your data is structured and relational

    Relational databases are ideal when your data consists of clearly defined entities with strong relationships.

    Example – In an e-commerce platform:

    • Users places an Order

    • Order can contain multiple Products

    • Products have associated Reviews and belong to a Category

    A relational schema with foreign keys makes it easy to model and enforce these relationships, and SQL allows efficient querying via joins.

    You need strong consistency

    Relational databases provide full ACID compliance, ensuring reliable transactions.

    Example – In a digital payments system, transferring money between accounts requires atomic updates. If one step fails, the entire transaction rolls back, preserving data integrity.

    This level of data integrity and transactional safety is what relational databases excel at.

    You require complex queries and reporting

    Relational databases provide SQL, a powerful and expressive query language. SQL supports filtering, aggregation, grouping, and multi-table joins.

    Design Considerations

    Indexing

    Indexes speed up read-heavy queries by allowing the database to quickly locate rows.

    Create indexes on frequently queried columns (e.g., user_id, email). Use composite indexes for multi-column filters. Avoid over-indexing in write-heavy systems, as it can slow down inserts and updates.

    Normalization vs Denormalization

    Normalize to reduce redundancy and ensure consistency. Denormalize in read-heavy systems to reduce join overhead.

    Joins

    Joins are powerful for analytics and reporting. However, avoid excessive joins on large tables as they can become performance bottlenecks. Never design for cross-shard joins unless absolutely necessary.

    Sharding

    Sharding enables horizontal scaling but introduces complexity.

    Choose high-cardinality shard keys (e.g., user_id) to distribute load evenly. Be mindful that cross-shard queries and transactions are difficult to implement.

    Scaling

    • Vertical scaling (adding more CPU/RAM to a single machine): Easy but limited.

    • Horizontal scaling: Add read replicas, partition large tables, and use caching (e.g., Redis) for frequently accessed data

    Example databases

    • PostgreSQL – Open-source, feature-rich, ACID-compliant

    • MySQL – Widely used, especially in LAMP stack applications

    • Oracle DB – Enterprise-grade RDBMS


    2. In-Memory

    An In-Memory Database stores data directly in RAM instead of disk. This makes it blazingly fast for read and write operations

    When to use it

    You need ultra-low latency

    In-memory databases are ideal for applications that demand near-instantaneous responses.

    Example: A real-time leaderboard in a gaming app where scores are updated and ranked instantly.

    The data is temporary or can be regenerated

    In-memory databases are great for storing data that can be recomputed if lost.

    Example: Caching trending search results to reduce repeated computation and speed up queries.

    You want to reduce load on your main database

    In-memory stores can act as a high-speed caching layer to offload frequent reads from your primary database.

    Example: Caching user profile data in a social media platform to avoid repeated lookups in the main DB.

    Design Considerations

    Volatility

    Since RAM is volatile, data is lost on crash or restart unless persistence is enabled.

    Tools like Redis offer optional persistence via:

    • RDB (snapshotting): Saves data at intervals

    • AOF (Append Only File): Logs each write operation

    Eviction Policies

    RAM is fast, but limited. When memory runs out, older or less-used data is evicted. Common eviction policies include LRU, LFU and TTL.

    Keep It Lean

    Avoid storing large files or infrequently accessed data. Store only hot and frequently accessed data such as user sessions and recent activity.

    Replication

    Replication can improve read performance and provide failover support in case the primary instance goes down. Redis supports replica nodes and automatic failover using Sentinel or Cluster mode.

    However, replication is typically asynchronous, so there’s a risk of data loss if the primary fails before sync. Always persist critical data in a durable system like a relational database.

    Example databases

    • Redis – Lightning fast, supports data structures like lists, sets, sorted sets, and pub-sub

    • Memcached – Simple key-value store for caching

    • Apache Ignite – Distributed in-memory store with SQL support

    • Hazelcast – Often used in Java-based enterprise applications


    3. Key-Value

    A Key-Value Database is the simplest type of database. It stores data as a collection of key-value pairs, where each key is unique and maps directly to a value. Think of it like a giant, distributed HashMap.

    There are no tables, schemas, or relationships—just keys and values. This makes key-value stores extremely fast and highly scalable.

    When to use it

    You need fast lookups by unique key

    Key-value stores offer constant-time (O(1)) reads and writes, making them ideal for quick access using a unique identifier.

    Examples:

    • Storing user sessions as userId → sessionInfo in a web application.

    • Storing shortURL → fullURL mappings in a URL shortener service.

    You don’t need complex queries or relationships

    If your data doesn’t require joins, filtering, or relational constraints, a key-value store is a simple and scalable choice.

    You’re dealing with high-volume, low-latency workloads

    Key-value stores are designed for massive throughput and are often used in systems that demand millions of reads/writes per second with minimal latency.

    Design Considerations

    Lookup-only access

    You can only retrieve values by key. They typically don’t provide filtering, sorting, or joining. Secondary indexes are typically not supported.

    No enforced schema

    Key-value databases are schema-less. Values can be strings, JSON, or binary blobs.

    This gives you flexibility but also puts the burden on your application to handle serialization/deserialization and versioning of the data model.

    Easy horizontal scaling

    Key-based partitioning enables seamless distribution across nodes using consistent hashing or range-based partitioning.

    To distribute keys evenly, choose high-cardinality keys (avoid country_code if most users are from one region)

    Example databases

    • Redis – Also acts as a key-value store with rich data types

    • Amazon DynamoDB – Managed, horizontally scalable key-value store

    • Riak KV – Distributed, fault-tolerant key-value system

    • Aerospike – High performance for low-latency read/write at scale


    4. Document

    This post is for paid subscribers

    Already a paid subscriber? Sign in
    Share
    Facebook
    Twitter
    Pinterest
    WhatsApp
      Previous article
      Design a Web Crawler – System Design Interview
      Next article
      Designing a Distributed Rate Limiter
      Algomaster
      Algomasterhttps://blog.algomaster.io
      RELATED ARTICLES
      Guest Blogs

      Interview With Ralph Merhi – CEO of ERP.Aero by Shauli Zacks

      9 October 2025
      Guest Blogs

      Interview With Karolis Toleikis – CEO of IPRoyal by Shauli Zacks

      9 October 2025
      Guest Blogs

      How to Delete Your Instagram Account: Detailed Guide for 2025 by Ivan Stevanovic

      9 October 2025

      LEAVE A REPLY Cancel reply

      Log in to leave a comment

      Most Popular

      Google experiments with faster app launch shortcut on Pixel

      11 October 2025

      YouTube gives banned creators a second shot, but with a catch

      11 October 2025

      Pebble sets the stage for its comeback with the revival of its app store

      11 October 2025

      The Pixel Watch 4 shines with its repairability score that’s through the roof

      11 October 2025
      Load more
      Algomaster
      Algomaster
      202 POSTS0 COMMENTS
      https://blog.algomaster.io
      Calisto Chipfumbu
      Calisto Chipfumbu
      6734 POSTS0 COMMENTS
      http://cchipfumbu@gmail.com
      Dominic
      Dominic
      32350 POSTS0 COMMENTS
      http://wardslaus.com
      Milvus
      Milvus
      87 POSTS0 COMMENTS
      https://milvus.io/
      Nango Kala
      Nango Kala
      6720 POSTS0 COMMENTS
      neverop
      neverop
      0 POSTS0 COMMENTS
      https://geeksforgeeks.org
      Nicole Veronica
      Nicole Veronica
      11882 POSTS0 COMMENTS
      Nokonwaba Nkukhwana
      Nokonwaba Nkukhwana
      11941 POSTS0 COMMENTS
      Safety Detectives
      Safety Detectives
      2674 POSTS0 COMMENTS
      https://www.safetydetectives.com/
      Shaida Kate Naidoo
      Shaida Kate Naidoo
      6839 POSTS0 COMMENTS
      Ted Musemwa
      Ted Musemwa
      7101 POSTS0 COMMENTS
      Thapelo Manthata
      Thapelo Manthata
      6794 POSTS0 COMMENTS
      Umr Jansen
      Umr Jansen
      6794 POSTS0 COMMENTS

      EDITOR PICKS

      Google experiments with faster app launch shortcut on Pixel

      11 October 2025

      YouTube gives banned creators a second shot, but with a catch

      11 October 2025

      Pebble sets the stage for its comeback with the revival of its app store

      11 October 2025

      POPULAR POSTS

      Google experiments with faster app launch shortcut on Pixel

      11 October 2025

      YouTube gives banned creators a second shot, but with a catch

      11 October 2025

      Pebble sets the stage for its comeback with the revival of its app store

      11 October 2025

      POPULAR CATEGORY

      • Languages45985
      • Data Modelling & AI17572
      • Java15156
      • Android14854
      • Mobile12983
      • Guest Blogs12720
      • Javascript12713
      • Data Structure & Algorithm10077
      Logo

      ABOUT US

      We provide you with the latest breaking news and videos straight from the technology industry.

      Contact us: hello@geeksforgeeks.org

      FOLLOW US

      Blogger
      Facebook
      Flickr
      Instagram
      VKontakte

      © NeverOpen 2022

      • Home
      • News
      • Data Modelling & AI
      • Mobile
      • Languages
      • Guest Blogs
      • Discussion
      • Our Team