Most voted "mongodb" questions
Use this tag when the question refers to a resource, information, or problem that relates exclusively to the Nosql Mongodb database. Mongodb is a scalable, open source, high-performance, schematic, and document-oriented database that supports a large number of application development languages and platforms. Mongodb is recognized as the main Nosql database.
Learn more…587 questions
Sort by count of
-
47
votes1
answer5885
viewsHow to choose between Nosql and SQL?
Nosql databases are there, and one question I always have when starting a project is what criteria to choose between a relational database or not. How to evaluate my project to know the best option…
-
13
votes1
answer546
viewsFilter locations in an area of X km
I am trying to set up a small project where I have a list of locations and can filter them according to a x km amount. Ex: Filter all places within a 5km radius of my current location. I have a Json…
-
11
votes1
answer744
viewsWhat is the difference between save and Insert in Mongodb?
What difference in the Mongodb between insert item with save and with Insert ? Example: db.pessoa.insert({"nome":"João"}); db.pessoa.save({"nome":"Maria"});…
mongodbasked 7 years, 4 months ago Eduardo Sampaio 1,425 -
10
votes4
answers5616
viewsWhat kind of application can I use Mongodb in?
Use Mongodb in every kind of application is bad? There are application types where it is most recommended and types where it is not recommended to use a Nosql?…
-
8
votes1
answer2562
viewsMain differences between Mongodb and Redis
I’m reading a book on real time applications with Nodejs. The author used Mongodb and Redis to exemplify the use of database with Nodejs. My doubt arose when he used both at the same time,…
-
8
votes1
answer221
views -
7
votes1
answer1976
viewsField "__v" in all documents of a collection
All my documents in a Mongodb database have a field __v, what it means? > db.speeds.find({}).limit(2).pretty() { "_id" : ObjectId("586826f700890738a5e8cb3d"), "remoteId" : 1, "first" :…
-
6
votes2
answers1682
viewsHow to make a "JOIN" in two Colections in Mongodb?
I know Mongodb doesn’t have Ner Join, but I really need to filter the data from a Collection by reference to its _id in another Collection. I need to display only the projects of a particular user.…
-
6
votes1
answer310
viewsMongodb in production
I have an application that uses Mongodb, I’m already coming to the end of its development and I just started thinking about how would be made the installation of this bank in production environment.…
-
6
votes1
answer384
viewsCategory tree in Mongodb, how to model?
Good night, you guys. As Mongodb changes a lot our way of modeling a database, I came across a question that can be up to half beast. I’m doing a Restful API using Lumen and Mongodb as a database,…
-
5
votes2
answers2465
viewsWrong time on Mongodb
When I put in the schema mongodb: created: { type: Date, default: Date.now } The time is with a difference of 3 hours more. How can I fix this?
-
5
votes1
answer489
viewsError installing mongodb 3.0 on Ubuntu 15.10 Linux?
I’m trying to install the MongoDB in the Ubuntu 15.10, but, I cannot install Mongo always returning the following error when starting the service. Failed to start mongod.service: Unit mongod.service…
-
5
votes1
answer1177
viewsSpeed difference in HD Sata/SSD
I have Mongodb running on a 500GB SSD HD. But as the folder /date started to get too big, we put a HD slave 3TB, but this being SATA and not SSD as the first. But after changing the date folder to…
-
5
votes2
answers3089
viewsJS node - Mongodb x Mysql
Why every JS Node tutorial we see, is always shown example in Mongodb. What you both have that are so used? Why not use Mysql with Node?
-
5
votes1
answer28
viewsI cannot return another field other than the primary key using $project
I’m starting in Mongodb and would like to perform a consultation in my database of type: Which animals got sick in the year 2016? Using $group and $project: db.animais.aggregate([ {$unwind :…
-
5
votes1
answer647
viewsConnecting Go with Mongodb using Docker
I am creating a microservice in Go, using Mongodb as a database and using the library mgo. Using Mongodb in a Docker container locally and running the application on my machine, everything works…
-
5
votes1
answer132
viewsComparison of hours in Laravel
I’m trying to create a method that will return the amount of minutes since the last insertion in the bank. That’s the way I did it, but I’m making a mistake: $now = Carbon::now(); $minutes =…
-
4
votes1
answer1536
viewsIs it possible to create a remote server with Mongodb? How?
My question, to be clear, is to create a server with mongodb in a cloud hosting (for example) and access it through another server. Example: I have a mobile app. I hosted my mongoDB in a cloud…
-
4
votes1
answer2380
viewsDoubt the $group mongodb
I need to use the grouping operator $group of mongodb, but every explanation I find is very confusing. How this works and what is the benefit of using this operator?
-
4
votes1
answer1713
viewsForeign key on Mongodb
I have the collection users and the collection shopping The ratio is 1 user to N purchases where each purchase is a document. What I intended was, when making a findOne in the users table, would…
mongodbasked 10 years, 2 months ago Filipe Moraes 8,737 -
4
votes2
answers888
viewsAre there BI/OLAP tools for the MEAN.JS platform?
Someone can indicate me a BI/ OLAP framework or at least a Chart Engine, preferably open-source, that integrates properly the platform MEAN.JS or MEAN IO architecturally SPA - Single Page…
angularjs node.js mongodb express business-intelligenceasked 10 years, 2 months ago Fernando Santucci 161 -
4
votes1
answer421
viewsChange field Unique Collection mongodb
Good morning, I have a Collection in the mongodb with a field unique:true. I would like to change this field to false. If I change the code and delete all Collection works, but if I make the change…
-
4
votes1
answer231
viewsDoubt Dbref Mongodb
I have two collections in mongodb called businesses and users: ********** Coleção Empresas ********** { "_id": ObjectId("54f38340448d3f436993edf6"), "cnpj": "12345678900000", "razao": "EMPRESA…
mongodbasked 9 years, 9 months ago Leonardo Moura 41 -
4
votes3
answers1030
viewsSearch Mongodb Array
I have these two documents in the Mongo: /* 0 */ { "_id" : ObjectId("54f395ef7a5a5ea37af77398"), "HISTORICO" : [], "MOTIVO" : "", "RP_CANCELAMENTO" : "", "DATA_CANCELAMENTO" : null, "RP_FINALIZACAO"…
-
4
votes1
answer38
viewsJava+Database - Add Scroll to existing user via Java
Mongodb use with Java and accurate, through Java run the following command on mongoDB: db.grantRolesToUser( "joao", [ {role:"dbOwner",db:"loja"} ] ) That is, I need to add a scroll to an existing…
-
4
votes2
answers1693
viewsWhy can’t I open the Mongodb interface on port : 28017?
I installed Mongo in the C drive and did some data creation tests and persisted,then consulted and there they were perfectly listed at the prompt. So far so good! I open the browser and type…
-
4
votes2
answers2228
viewsUpdate in array in Mongodb
{ "_id" : "55dcb404478e7227203d3a65", "Nome" : "Grupo Familia", "Pessoas" : [ { "PessoaId" : "55dcb425478e72207833e970", "Nome" : "Carlos", "Habilidades" : [ { "HabilidadeId" :…
-
4
votes2
answers2570
viewsError "Class 'Mongodb Driver Manager' not found"
At the time of use of the Mongodb, along with the Laravel it returns the following error: Fatalerrorexception in Client.php line 61: Class 'Mongodb Driver Manager' not found…
-
4
votes1
answer329
viewsHow to filter an array within a Collection in MONGODB - C#
I have the Collection PESSOA with a list of Languages as below: { "_id" : ObjectId("576be476ab76191bec2ff38c"), "Nome" : "Nome um", "Idiomas" : [ { "idioma" : "pt-BR", "descricao" : "Brasil" }, {…
-
4
votes1
answer331
viewsRight Way to Make Relationship One To Many Using C# and Mongodb
I have two entities, Sistema and Comentario where a system can have several comments: public class Sistema { public ObjectId Id { get; set; } [BsonElement("SistemaId")] public int SistemaId { get;…
-
4
votes1
answer506
viewsI cannot insert into Mongodb using Java
I’m new in Mongo, I’m trying to make an Insert in the bank but it’s a problem when inserting import com.mongodb.BasicDBObject; import com.mongodb.DB; import com.mongodb.DBCollection; import…
-
4
votes1
answer121
viewsHow do I get Exception Mongoid::Errors::Documentnotfound released on Mongoid
I’m trying to do a test similar to the one below to capture the Exception of a non-existent document expect(Produto.find('57e2bf76ce222fd11258cd4e')).to…
-
4
votes1
answer295
viewsSlow query about Mongodb with index
I have a Mongodb collection of about 1.7 million documents, averaging 6kb per document. The bank is in a reasonable machine, with 6Gb of RAM and 4 Cpus This collection has an index on all fields of…
mongodbasked 6 years, 3 months ago Eduardo Klein 93 -
3
votes1
answer109
viewsLimit Aggregation by grouped item in Mongo
I have a collection composed as follows, only with much more data. { _id: ObjectId("db759d014f70743495ef1000"), tracked_item_origin: "winword", tracked_item_type: "Software", machine_user:…
-
3
votes1
answer4847
views"Failed to connect to 127.0.0.1:27017, Reason: Errno:111 Connection refused" starting mongodb
I installed mongodb as suggested on the official website(*), started the service, but when I tried to use the Mongo command on the terminal the following error was returned:…
mongodbasked 10 years, 3 months ago Alessandro Sales 109 -
3
votes1
answer853
viewsTime interval query in mongodb using pymongo
I need to perform a query in a mongodb database that results in a set of results per time range. I am using pymongo. My consultation is as follows: queryConsulta = {"$and": [ {"id_no": id_node},…
-
3
votes2
answers372
viewsCollate Mongodb
I need to make an auto complete that consumes a Mongodb database. The words can be written with or without accent, uppercase or lowercase, that is, I need to define a collate in the Ngo that allows…
-
3
votes2
answers395
viewsHow to improve mongoDB query performance in collections with millions of records and each with many searchable attributes?
There is a collection with approximately 20 million records and each of them with about 200 searchable attributes. Example: {atrib001:"abc", atrib002:"123", atrib003:"1x3"... atrib200:"1zz"} The…
mongodbasked 9 years ago amiguinho20 31 -
3
votes0
answers111
viewsMongodb stopping to work
We are in the company testing a project using Mongodb database. The database is installed on a Linux server (Centos), with 32GB of RAM, but sometimes the database para de funcionar and needs to be…
-
3
votes1
answer167
viewsMVC# - Mongodb 2.0 dependency injection
I’m starting a project using MVC 4 with Driver 2.0 of MongoDB. I’m used to using Ninject with EF6 and would like to know if there is such a thing as MongoDBor some example architecture standard for…
c# pattern-design mongodb dependency-injection mongodb-csharpasked 8 years, 11 months ago Jhonathan 1,399 -
3
votes1
answer199
viewsUpdate Mongodb in array
{ "_id" : "55dcb404478e7227203d3a65", "Nome" : "Grupo Familia", "Pessoas" : [ { "PessoaId" : "55dcb425478e72207833e970", "Nome" : "Carlos", "Habilidades" : [ { "HabilidadeId" :…
-
3
votes1
answer237
viewsConvert Double to String Mongodb
I own a field Double in a Collection on Mongodb and would like to exchange this field in every collection to String.
-
3
votes1
answer416
viewsSecurity when sending and taking data from a URL
Hello, I’m learning development and I don’t know much about security. I’m making a web application using Nodejs + Expressjs + AngularJs + MongoDB. I did it this way, Mongodb data is sent to a URL…
-
3
votes2
answers1807
views"Class 'Mongoclient' not found" error
I recently installed in my Macbook Mongodb, I installed the extension in native PHP, which I am using together with native apache. The problem is this, if I run the web page on Apache I get the…
-
3
votes1
answer138
viewsWhat does maximum depth level mean?
I recently read this article, what are you saying: The maximum depth level of a document is 100. Which left me with the following doubt: What the author is saying with depth level of a document?…
-
3
votes1
answer342
viewsMongodb references
I intend to make a website. Will have two Collections "sleeve stripes", where it will bear the name of several sleeves. "genero", where will have the generos type "Action," On the website you will…
mongodbasked 8 years, 11 months ago Braian Silva 333 -
3
votes2
answers1223
viewsMongo find em array dentro de Collection
Good people, this is my exit with the normal find: { "_id" : ObjectId("57be6168ce98ad853a96282f"), "nome" : "Mercado Padrão", "userId" : "o4wQ2i4Dt7cAMNf9A", "produtos" : [ { "nome" : "coca cola",…
-
3
votes2
answers228
viewsWhere to store the information?
I have an application in angular, basic with forms that stores the data in arrays and receives the dado in dados in div's. Now how can I store this data? What options have I been using Angularjs?…
-
3
votes1
answer116
viewsMongodb Driver Fields Exclude
My problem is this, I have an object: public class Obj(){ prop int id {get; set;} prop Client client {get; set;} } public class Client(){ prop int id {get; set;} prop Group group {get; set;} }…
-
3
votes1
answer624
viewsIs it necessary to close Mongodb connections with Pymongo?
I am working on a REST API with Python (Flask + Mongodb) and during development I checked that, nowhere in the code, had I released the resources from the database. I have researched around but…