Skip to main content

All Questions

0 votes
1 answer
42 views

MongoDB best practices for many sensors (+50k) but slow updates (every 12hrs)

I am trying to get some advice on how to appropriately structure my MongoDB Database. I am on Mongo Atlas M10 and my data structure looks like this: { sensorId: "12345", epoch: Date, ...
Hyun Seo's user avatar
0 votes
1 answer
184 views

Explicit many-to-many relation Prisma schema syntax for MongoDB

The following is my Prisma Schema for 3 models --> User, Cart and Item. model User { id String @id @default(auto()) @map("_id") @db.ObjectId name String email ...
Harsingh Sekhon's user avatar
1 vote
0 answers
43 views

Best Practices for Efficiently Writing Time Series Data to MongoDB Collections with Dynamic Variables

I am currently working on a project involving MongoDB with three collections: datasources, variables, and a time series collection values. The values collection stores time-stamped data for various ...
anonymous_33008899's user avatar
-1 votes
1 answer
95 views

Can you use a MongoDB document ID as a key in another document?

I'm trying to implement a cart collection for an e-commerce app in MongoDB Atlas and am unsure of the correct way to reference the products in a user's cart which are in a separate collection. Can I ...
Sylith's user avatar
  • 588
-2 votes
1 answer
24 views

Probleme schema Design mongodb nodejs mongoos

Im trying to create a knew schema mongodb like this : `const badgeSchema = new Schema({ emt: { type: String, required: true }, modele: { type: String, required: true }, code: { type: String,...
Amine Gabsi's user avatar
0 votes
1 answer
48 views

Is it possible to store 100,000+ columns in a database table?

I want to store Genetic variants of patients in a database. Number of patients are around 1000 but for each patient there are more than 100,000 Genetic variants. Can anyone advice me how to design ...
arshad's user avatar
  • 437
0 votes
0 answers
65 views

In MongoDB, how to roll back update to one collection if update fails on another collection?

For example, a user is deleted in the members collection. Thus, all of its documents must also be deleted in all other collections. After successfully deleting the user from the members collection, ...
Bear Bile Farming is Torture's user avatar
-2 votes
1 answer
45 views

How to determine order in Interaction collection between members?

I have decided to have an interaction collection to hold the interactions between members of my App. Who blocked who, who liked who, who followed who, etc. The schema will look something like this: { ...
Bear Bile Farming is Torture's user avatar
-1 votes
1 answer
91 views

Is there any use case for mongodb two-sided relationship?

I see many opinions online including mongodb's own docs, saying declaring a two sided relationship/reference in mongodb can optimize read queries on the has_many side, eg: // psuedo code for brevity //...
goldylucks's user avatar
  • 6,064
0 votes
0 answers
25 views

Storing ipv4 and ipv6 in MongoDB [duplicate]

I am building a database (i prefer MongoDB) that i will store over 100 mil ipv4 and ipv6 records for logging purposes. Data sample : 1.1.1.1 -> 0x1010101 1.2.3.4 -> 0x1020304 34.53.63.25 -> ...
maxsand's user avatar
-2 votes
2 answers
166 views

Which database can handle deeply nested objects? [closed]

I want to get object like this: [ { label: "first", id: 1, children: [] }, { label: "second", id: 2, children: [ { label: "third&...
moanrisy's user avatar
  • 109
-1 votes
1 answer
48 views

MongoDB large array or documents

We are trying to save profile views. We created a schema something like that { user: userId, viewers: [] } We think the viewers array could have millions of items So would it make more sense to ...
AuroPick's user avatar
0 votes
0 answers
90 views

What is the time complexity of performing a UNION on 2 tables in MongoDB?

If table A has N rows and table B has M rows, what is the time complexity to UNION them together into one single table?
Bear Bile Farming is Torture's user avatar
0 votes
1 answer
808 views

Is the time complexity of querying an indexed column O(1)?

Let's suppose that table A has a column named X which is numeric and indexed. If the query is something like: find all rows where X is greater than some value Is the time complexity of retrieving the ...
Bear Bile Farming is Torture's user avatar
-2 votes
1 answer
100 views

Next.js/Mongodb Assignment Status for Individual Student in a LMS

I am building a MERN (with Next.js) stack Learning Management System. Currently, I have built the front-end for the Assignments that lists the assignments for that course. For example, if I am logged ...
SSubedi's user avatar
  • 121

15 30 50 per page
1
2 3 4 5
15