---
title: "Discussion on \"How to Choose The Right Database for Your Application\" | Hashnode"
description: "Discussion on \"How to Choose The Right Database for Your Application\". Important points to consider, Relational vs Non-relational Database, CAP theorem, and more!"
url: "https://hashnode.com/posts/how-to-choose-the-right-database-for-your-application/628096e1bc9305ec39364468"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Choose The Right Database for Your Application](https://apoorvtyagi.tech/how-to-choose-the-right-database-for-your-application?utm_source=hashnode&utm_medium=feed)

Important points to consider, Relational vs Non-relational Database, CAP theorem, and more!

May 15, 2022 · 8 min read · apoorvtyagi.tech  
Updated Mar 5, 2023  
Read the article

-   [#thw-web-apps](https://hashnode.com/tag/thw-web-apps)
-   [#programming](https://hashnode.com/tag/programming)
-   [#databases](https://hashnode.com/tag/databases)
-   [#sql](https://hashnode.com/tag/sql)
-   [#nosql](https://hashnode.com/tag/nosql)

## Written by

[Apoorv Tyagi](https://hashnode.com/@apoorvtyagi)

@apoorvtyagi · India

  
[View profile](https://hashnode.com/@apoorvtyagi)

Senior Software Engineer | Tech Blogger | !(Chess GM)

Senior Software Engineer. I write about practical tips and epic stories about my experiences in the field of computer science and engineering!

## Responses 2

Markdown supported · ⌘↵ to post

[Alvin Endratno](https://hashnode.com/@alvinend)

[May 19, 2022](https://hashnode.com/posts/how-to-choose-the-right-database-for-your-application/628096e1bc9305ec39364468/comment/6285fad57b02ca162edadd32)

> Speed and scalability are critical.

Just out of curiosity. Could you explain about NoSQL's speed 🤔 ? I know NoSQL Database is very scalable. But SQL Databases (at least in my mind) is faster because of their maturity and indexing features.

Thank you for the great article 😀!

[Apoorv Tyagi](https://hashnode.com/@apoorvtyagi)

[May 19, 2022](https://hashnode.com/posts/how-to-choose-the-right-database-for-your-application/628096e1bc9305ec39364468/comment/6285fad57b02ca162edadd32#reply-6286719283966a1653f1549c)

Hi [Alvin Endratno](https://hashnode.com/@alvinend). Thanks.

And for your question, as per what I have discovered, In SQL databases, there is a process that validates that the inserted data corresponds to the defined schema of the table.

This process sometimes takes time as we validate each data item against the corresponding column. Once we go schemaless with NoSQL, we can save this time. Thus, NoSQL databases may provide better write operations per second as compared to SQL DB.

In the case of read operations, both SQL as well as NoSQL support indexes. Yes, SQL joins are better optimized than MongoDB's aggregate functions but MongoDB can store more complex documents, with all the dependent data together in nested structures. That way you don't have to do joins which optimizes for a certain kind of data retrieval.

[Andrew Baisden](https://hashnode.com/@andrewbaisden)

[May 16, 2022](https://hashnode.com/posts/how-to-choose-the-right-database-for-your-application/628096e1bc9305ec39364468/comment/6282800783e2720b553c5377)

Great comparison of the two types of databases [Apoorv Tyagi](https://hashnode.com/@apoorvtyagi).

[Apoorv Tyagi](https://hashnode.com/@apoorvtyagi)

[May 16, 2022](https://hashnode.com/posts/how-to-choose-the-right-database-for-your-application/628096e1bc9305ec39364468/comment/6282800783e2720b553c5377#reply-628283f183e2720b553c5411)

Thank you so much [Andrew Baisden](https://hashnode.com/@andrewbaisden). Glad you like it :)
