- Flask Framework Cookbook(Second Edition)
- Shalabh Aggarwal
- 220字
- 2021-06-24 13:58:07
Opting for the NoSQL way with MongoDB
Sometimes, the data to be used in the application we are building may not be structured at all, may be semi-structured, or there may be some data whose schema changes over time. In such cases, we would refrain from using an RDBMS, as it adds to the pain and is difficult to understand and maintain. For such cases, we might want to use a NoSQL database.
Also, as a result of fast and quick development in the currently prevalent development environment, it is not always possible to design the perfect schema the first time. NoSQL provides the flexibility to modify the schema without much hassle.
In production environments, the database usually grows to a huge size over a period of time. This drastically affects the performance of the overall system. Vertical and horizontal scaling techniques are available, but they can be very costly at times. In such cases, a NoSQL database can be considered, as it is designed from scratch for similar purposes. The ability of NoSQL databases to run on large multiple clusters and handle huge volumes of data generated with high velocity makes them a good choice when looking to handle scaling issues with traditional RDBMS.
In this recipe, we will use MongoDB to learn how to integrate NoSQL with Flask.