This week’s post will focus on the powerful backend tool, MongoDB and its data modeling features. MongoDB is a NoSQL database management system that’s mainly used to handle large datasets through a method called sharding. Sharding is a process that involves utilizing multiple servers to distribute data which improves scalability. This tool is especially flexible in various languages like C, C++, C#, Go, Java, Python, Ruby and Swift, making it applicable in numerous types of projects. Additionally, MongoDB is well-suited for use with Node.js, Express.js, and other modern web frameworks, making it an integral part of the MEAN and MERN stacks.
MongoDB is different from other backend data management tools because it uses NoSQL, instead of tables and rows of data it uses collections and documents of key-value pairs. These documents utilize Binary JSON or BSON because it accommodates more data types, making it versatile in any format. Gillis adds, “Documents will also incorporate a primary key as a unique identifier. A document’s structure is changed by adding or deleting new or existing fields”, which allows for fast indexing and queries.
Unlike traditional relational databases with fixed schemas, “MongoDB doesn’t require predefined schemas. It stores any type of data. This gives users the flexibility to create any number of fields in a document, making it easier to scale MongoDB databases compared to relational databases”. This one feature allows developers to not have to worry about changing schemas in the future due to changing product expectations.
According to Alexander Gillis from TechTarget, “Organizations also use MongoDB for its ad-hoc queries, indexing, load balancing, aggregation, server-side JavaScript execution and other features”. Uber uses MongoDB to optimize ride-hailing logistics, ensuring low latency even during peak traffic. Adobe uses it for handling billions of document transactions efficiently, ensuring user productivity on platforms like Adobe Creative Clouds.
When deciding to use MongoDB, it’s important to account for its shortcomings, for example, its non-relational nature can lead to duplicated data, which may require careful management. Additionally, it puts a lot of stress on memory resources. Another problem is its security, because user authentication is setup on default, hackers have learned to target un-secure MongoDB databases. Despite this, MongoDB is an example of how modern backend tools cater to the evolving needs of developers. Its flexibility and scalability make it a dependable tool when dealing with the unpredictable demands in software.
I specifically chose this topic to research because it will be crucial tool to have in my arsenal when working in full-stack projects. Additionally, this tool is the main backend tool for Thea’s Pantry, making this information vital for my capstone project. I hope to utilize this information next semester.
Blog: https://www.techtarget.com/searchdatamanagement/definition/MongoDB
From the blog CS@Worcester – Computer Science Through a Senior by Winston Luu and used with permission of the author. All other rights reserved by the author.