Questions tagged [mongodb]
MongoDB is a scalable, high-performance, open source, document-oriented database. It supports a large number of languages and application development platforms. Questions about administrating it can be asked on dba.stackexchange.com
203 questions
0 votes
1 answer
164 views
Reorganize data with pattern while migrating from SQL to MongoDB
I have several tables in Oracle, in each of them are stored data about a different kind of tax declaration (house tax, hotel tax, and so on). All of them have some data in common, so I want to migrate ...
0 votes
1 answer
929 views
MongoDB schema: optional vs. nullable
If I have a schema that includes fields that may or may not be set, what is the best way to handle these fields? Should they be optional or instead nullable? Here an example (Mongoose/NestJs) @Schema()...
1 vote
4 answers
1k views
Microservices distributed lock mechanism
I am using spring boot with mongo db (azure cosmos db) in my microservices. Currently I have an Orders collection that stores Orders. These documents have a field userId that is null when the document ...
1 vote
0 answers
44 views
Optimised MongoDB design for access control at project/organisation level
I'm looking for the optimised approach of designing MongoDB database collections where there are three stakeholders- A User (who accesses a portal). An Organization (which can have multiple Projects)....
1 vote
1 answer
150 views
Aggregating embedded documents in MongoDB
I'm designing a mongo database and I have a dilemma if I should go for normalization. Let's say that there is a database with images and descriptions. Many alternative descriptions can belong to one ...
1 vote
1 answer
2k views
Difference between Resolvers and Controllers?
I may be overthinking it, but are controllers and resolvers the same thing in web applications? Coming from the MERN stack, everyone used to call these request processing functions "controllers,&...
1 vote
1 answer
149 views
What's the difference between MongoDB Query API and MondoDB Query Language?
So I've been trying to understand the difference between MongoDB's Query API and its Query Language but I haven't been able to find a definitive answer. I've been reading the MongoDB Docs and it is ...
0 votes
1 answer
480 views
Store UUID Reference vs. storing string in Mongodb
I am trying to store user preference for notifications. One way to do is store types of notification in separate collection and store UUID of that notification type in user table. e.g. notification-...