DEV Community

Cover image for From localStorage to Database: Understanding the MongoDB Structure❗

From localStorage to Database: Understanding the MongoDB Structure❗

Theodora Cristea on November 19, 2025

Intro Hey everyone!🤗 If you are a developer who is just starting to work with databases, or perhaps you already know the basics and are ...
Collapse
 
xwero profile image
david duymelinck • Edited

I think NoSQL is an outdated term. According to AI it seems to be coined by Carlo Strozzi in 1998 on the Big Data mailinglist. But I couldn't get confirmation.
The first MongoDB version is from 2009. So NoSQL is not directly linked to MongoDB.

I think nowadays the distinction between the query language and the database type is more appropriate.
There are the relational databases, columnar databases, document databases, graph databases and vector databases.
Some of them use SQL, others use their own format.
So if you need to categorize databases i think it is best done by type and not by query language.

The reason I read the post was because of the title. How are you going from localStorage, a browser database API, to MongoDB, a server database?
Technically you can run MongoDB if you put it in Webassemby, but that is a bit silly.

but as our apps kept scaling, that stiffnes became a real bottleneck for moving fast.

It is not the tabular format of relational databases that is the bottleneck. The biggest bottleneck is the ACID concept. That makes sure the data in the database is valid whatever kind of errors are happening.
Several database type/systems drop that concept for the BASE concept that has eventual consistency.

I hope this deeper dive on database systems gives you a better view on the use of databases.

Collapse
 
cristea_theodora_6200140b profile image
Theodora Cristea • Edited

Thank you for your opinion, Sir!🥰 Thank you for taking the time to read the article and write me such a detailed message!🥰

It is appreciated. I am perfectly in agreement with you, and thank you for this detailed information!👏🏻👏🏻👏🏻

Regarding the title, From localStorage to Database, this was primarily an analogy for beginners in using databases, as I explained in the article: To get an idea, we can think of documents as the value stored in localStorage, but they are much more powerful than a simple string value in localStorage...

I made this analogy because, as a frontend developer (who usually doesn't deal with databases), we are accustomed to keeping website data inlocalStorage and are familiar with the keys and values there.

However, when transitioning to databases like MongoDB, as in my case, when I first heard terms like Collections, Documents, and databases, I didn't know what was what❗❓😂😂😂.. (I can swear many of us have had this confusion).

But by making this analogy, that we could think of the keys in localStorage (as we were used to) as Collections, and the values of the keys as Documents, it would be easier for us to assimilate the concepts and understand the database structure.
So the title, as I said above, signifies the transition from frontend to backend, the transition from localStorage to the database, it was purely an analogy, a metaphor.
OF COURSE THAT WOULD BE WEIRD to go from localStorage, a browser database API, to MongoDB, a server database, I didn't want it to be understood that way.😂


Therefore, I appreciate your question, and I apologize if the title misled anyone, although I did specify its meaning in the article.🙏

Regarding the information you sent, I made sure to search in more detail. I suspect that you, Sir, have greater experience, as I saw on your profile, 👏🏻👏🏻👏🏻 but I only started working in backend a few weeks ago. Nevertheless, I made sure to research thoroughly in order to make myself understood.


Based on my knowledge and everything I have read in the official documentation and reliable resources , MongoDB is considered one of the most important and defining types of NoSQL databases.

Here is why the connection between the two is considered fundamental in the IT industry:

NoSQL is the Category, MongoDB is the Product. The term NoSQL (or "Not Only SQL") represents a broad category of database management systems that do not use the traditional relational model. MongoDB is a specific product that belongs to this category, being the most popular type of NoSQL database oriented around documents (Document Database).

It is true that the term NoSQL was first used in 1998 by Carlo Strozzi, in this initial context, it referred to a relational database that, ironically, only avoided the SQL query interface in favor of C/C++ interfaces.

Official Definition: In 2009, driven by the Big Data movement and the increased demands for scalability and flexibility, the term NoSQL was relaunched and popularized by Johan Oskarsson. MongoDB defines itself and is widely recognized as a non-relational database, which is synonymous with NoSQL. On the MongoDB website, they consistently state that they offer a NoSQL alternative to SQL databases.

Modern Historical Context: while you were right Sir, that the term appeared in a different context in 1998 👏🏻, the NoSQL movement that matters today was repopularized in 2009. MongoDB was launched in the same year (2009) as a native solution for Big Data and scalability, making it a pioneer and a symbol of this new movement.

Essentially, we cannot discuss the modern NoSQL movement without mentioning MongoDB, and vice-versa. The link is direct and intrinsic.


Thank you for your time! It was a pleasure talking to you!👏🏻

Collapse
 
shemith_mohanan_6361bb8a2 profile image
shemith mohanan

Nice walkthrough! You explained MongoDB in a way beginners can relate to, especially the “localStorage → document” analogy — that’s a clean way to build intuition.
Curious if you’re planning a follow-up where you cover indexing or schema design choices? That would help readers level up fast.

Collapse
 
cristea_theodora_6200140b profile image
Theodora Cristea

Of course, I will do that soon!
Thanks for your time!🤗

Collapse
 
alexandru-ene-dev profile image
Alexandru Ene

Nice job, as always! Love reading your articles! :)

Collapse
 
cristea_theodora_6200140b profile image
Theodora Cristea

Thank you so much Alex!🥰 Your words mean a lot to me!🤗
Looking forward to connecting with you in the next post!🥰

Collapse
 
ahmed112 profile image
Ahmed Alasser

Great article! I really enjoyed the clear explanation and simple examples. Keep it up — looking forward to your next piece!

Collapse
 
cristea_theodora_6200140b profile image
Theodora Cristea

I look forward to connecting with you in the next one!
Thank you for your time @ahmed112 !

Collapse
 
ahmed112 profile image
Ahmed Alasser

Thanks a lot!
I really appreciate it 🙏✨

Collapse
 
sheep_ profile image
sheep

Nice job. Very helpful for beginners.

Collapse
 
cristea_theodora_6200140b profile image
Theodora Cristea

Thank you! I'm happy to know that!
Thanks for your time!🤗

Collapse
 
hadil profile image
Hadil Ben Abdallah

Great article, Theodora 👏🏻 You explained the MongoDB Structure very well 🔥

Collapse
 
cristea_theodora_6200140b profile image
Theodora Cristea

Thank you so much Hadil! 🥰🤗 Happy to hear that!

Collapse
 
olivia-john profile image
Olivia John

Thoughtful article, Theodora! Well explained.

Collapse
 
cristea_theodora_6200140b profile image
Theodora Cristea

Thank you so much, Olivia! 🤗
I'm glad to know that!

Collapse
 
camesp78 profile image
Enmanuel CamEsp

This was exactly what I needed as a beginner! The localStorage to MongoDB comparison finally made documents and collections click for me. Thank you for breaking it down so clearly!

Collapse
 
cristea_theodora_6200140b profile image
Theodora Cristea

I'm glad to hear that, personally I found it easier to make this comparison! 🤗
Thank you for your time @camesp78 !

Collapse
 
horlakay profile image
horlakay

Thank you Olivia for this article, it was really a helpful refresher!

Collapse
 
cristea_theodora_6200140b profile image
Theodora Cristea

That's great to hear! 🤗Thanks for your time @horlakay !
I believe you meant 'Theodora'! 🙃

Collapse
 
godblessyou profile image
GodBlessYou

Thank you Olivia for this article, it was really a helpful for me!

Collapse
 
cristea_theodora_6200140b profile image
Theodora Cristea

Thank you....!

Collapse
 
art_light profile image
Art light

Really enjoyed reading this! Your breakdown of MongoDB and how it evolves from localStorage is super insightful—especially for someone just starting out with databases. I love how you simplified the complexities of NoSQL and MongoDB, making it easy to understand. Can’t wait for more of your posts to dive deeper into the concepts!

I have already my DM to your discord.
But no response.(lighthouse4661)