Questions tagged [MongoDB] (1430)

1
answer

How to retrieve all product category from database?

I have, for example, 10 000 different products, and they belong to the 300 categories (electronics, food, toys...). The question, as in this case the right to select the list of categories in the database mongodb? I have the option to create a separate model for categories, and each adding new product to check whether such ...
buck66 asked April 19th 20 at 12:36
2
answers

How to add a field in the subdocument MongoDB not deleting the already existing field?

Help, I do not understand the logic! I have a collection of galleries, and each of them can have an array of albums. And gallery and albums can have their picture thumbnail to display in the list. I add the field image to the gallery without any problems, and everything is fine Merida: db.photos.update({_id:"1587050015794"...
joanie asked April 19th 20 at 12:23
0
answer

How to add and remove values in the same array?

Is it possible in one query, add and delete fields from a single field? db.colll.update({ tags : 1 },{ $pull: { tags: 1 }, $addToSet: { tags: 2 } }, { multi: true }) Does not work, as mongodb does not allow to appeal to one and tomuzhe field
Jesse_King35 asked April 19th 20 at 12:22
0
answer

How to make a remote connection to database on Windows server 2012?

Is the server in online - Windows server 2012. In the Internet Ip is the same as the car. Trying to connect to a MongoDB database on the server from home, but no way. Apparently the problem is not in the database, namely in Windows. set to check the telnet on both computers, from home ip and port will not connect. The port...
major_Paucek asked April 19th 20 at 11:56
1
answer

How to display user data in Node js + Express, MongoDB?

Hello!!! Need help!!! The user regaetsya to the site and fills in the information for your personal account, and next time when the authorization data is displayed on a personal account! I do not understand how to do it Do not judge strictly, I'm only a beginner
billy54 asked April 18th 20 at 13:33
1
answer

Is it possible to update data of several documents at the same time with the help updateMany in Mongo DB?

All good! I have let's say a basket that consists of an array aytemov that are in the database. products = [ { ID: 'co-00578_12-04-2020', name: 'item1', size: '1', qty: 1, imgUrl: 'img-url-co-00578.jpg', modified_on: 2020-04-12T13:59:32.423 Z }, { ID: '22b4b7b4-a2ea-11e8-b8f2-208984330634', name: 'item2', size: '1...
Antoinette_Jacobs asked April 18th 20 at 13:25
0
answer

How to build a query in mongodb?

there is a structure db1 { "_id" : UUID("83ccb7fc-0c42-4121-b4f9-6c7f2fb82fdd"), "items" : [ UUID("7eb90f2f-180e-4531-90ac-0ea1946f5155"), UUID("0e1e885f-4cee-4ef5-8220-b8d503ac3337"), UUID("543e4187-b752-4978-89df-234aca92a77c"), UUID("0e6e2c89-f007-4147-a433-ee0325ba2719"), ] } db2 { "_id" : UUID("7eb90f2...
frank.Barton62 asked April 18th 20 at 13:08
3
answers

Big load on the CPU what to optimize?

Hello. Write telegram. bot in nodejs + mongodb. It sends messages with pictures and description on request, there are filters and no messages are repeated, until all in the same category. Filters and id viewed is stored in the database, in the user's document. When performing this function, the load on the VPS processor j...
lucienne.Mosciski asked April 18th 20 at 12:50
0
answer

What is the analogue of phpmyadmin for mongo?

The question in the title. Adminer is not suitable, because of its incorrect work. It is desirable that the solution was simple to install, not java
Cary asked April 18th 20 at 12:31
2
answers

Where MongoDB stores the data(in memory or persistent storage)?

The essence of the question is whether the saved data after restarting the computer, or is it B. how redis stores data in RAM and to use it for cache?
greyson_Torp65 asked April 18th 20 at 12:29