Menu

Post image 1
Post image 2
Post image 3
Post image 4
Post image 5
Post image 6
Post image 7
Post image 8
1 / 8
0

MongoDB is Great. Mongoose Makes it Better.

DEV Community: database·Saumya Agrawal·about 1 month ago
#1VcLWyOl
#dev#virtuals#indexes#class#code#highlight
Reading 0:00
15s threshold

When I first started learning backend development, the database question came up almost immediately. Everyone has an opinion. SQL people will tell you it is the only correct way to store data. NoSQL people will tell you SQL is legacy thinking. I got confused fast, and honestly I am glad to have started with MongoDB. MongoDB is not always the right choice, but for a JavaScript developer learning backend for the first time, the mental model clicks in a way that SQL tables do not. Your data looks like objects. Your queries feel like JavaScript. You do not have to learn an entirely separate language just to get something saved and retrieved. You write code that looks like this: const user = { name : " Abc " , email : " abc@example.com " , age : 28 } And that is also, more or less, exactly what gets stored.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More