---
title: "When use a NoSQL database instead of a relational database? Is it okay to use both on the same site?"  
description: "When use a NoSQL database instead of a relational database? Is it okay to use both on the same site?"  
author: "Steilla Mitchel"  
published: 2023-08-24  
updated: 2023-08-26  
canonical: https://www.mindstick.com/forum/159659/when-use-a-nosql-database-instead-of-a-relational-database-is-it-okay-to-use-both-on-the-same-site  
category: "database"  
tags: ["database", "nosql"]  
reading_time: 2 minutes  

---

# When use a NoSQL database instead of a relational database? Is it okay to use both on the same site?

When should I use a [NoSQL database](https://www.mindstick.com/forum/160347/how-do-you-retrieve-data-from-a-nosql-database-like-mongodb) [instead of](https://www.mindstick.com/articles/330/triggers-in-sql-server) a [relational database](https://www.mindstick.com/forum/158346/what-is-sql-server-and-how-does-it-differ-from-other-relational-database-management-systems)? Is it okay to use both on the same site?

## Replies

### Reply by Aryan Kumar

You can use a [NoSQL](https://www.mindstick.com/articles/12053/big-data-nosql-data-stores) [database](https://www.mindstick.com/articles/12226/use-of-database-in-sencha-extjs-and-insert-record-from-user-form-using-ajax) instead of a [relational](https://www.mindstick.com/blog/10885/equality-relational-and-conditional-operators) database when:

- You need to store a large amount of unstructured data.
- You need to scale your database horizontally.
- You need to perform a lot of reads and writes.
- You need to optimize for a specific type of query.

Here are some examples of when you might want to use a NoSQL database:

- A social media platform would use a NoSQL database to store user profiles, posts, and comments.
- An e-commerce website would use a NoSQL database to store product listings, customer orders, and shipping information.
- A search engine would use a NoSQL database to store index data.

It is okay to use both NoSQL and relational databases on the same site. In fact, this is becoming increasingly common as applications become more complex and require the use of different types of databases.

Here are some reasons why you might want to use both NoSQL and relational databases on the same site:

- To store different types of data. For example, you might use a NoSQL database to store unstructured data, such as user profiles, and a relational database to store structured data, such as product listings.
- To optimize for different types of queries. For example, you might use a NoSQL database to optimize for reads and a relational database to optimize for joins.
- To scale your database horizontally. You can scale a NoSQL database by adding more nodes, while you can scale a relational database by adding more tables.

Ultimately, the decision of whether or not to use both NoSQL and relational databases on the same site depends on your specific needs and requirements.

Here are some additional things to keep in mind when using NoSQL and relational databases together:

- You need to choose the right database for the specific data that you are storing.
- You need to design your application to take advantage of the strengths of each type of database.
- You need to manage the data between the two databases.

By following these best practices, you can use NoSQL and relational databases together to create a scalable and efficient application.


---

Original Source: https://www.mindstick.com/forum/159659/when-use-a-nosql-database-instead-of-a-relational-database-is-it-okay-to-use-both-on-the-same-site

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
