Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

-2
votes
0answers
23 views

MongoDB optimization and search performance [on hold]

I looking for the best way (performance of search document) to store data in MongoDB. Some background: The database contains only one type of documents - is information about transactions in many ...
1
vote
1answer
97 views

How to better scale reads in a website: to CQRS or not to CQRS?

The company i'm working for it's rewriting a legacy web application and we are evaluating the better architecture to get the job done. The business domain is quite simple: there are few entities, ...
1
vote
0answers
25 views

avoid passing dbsession object to multiple modules

I have a project which has a service-oriented architecture. for example, anything relates to payment is inside payment module. -dao -config -constatnts -middlewares -modules -payment -user -...
0
votes
1answer
92 views

MongoDB mapreduce

I'm new to programming and mongoDB and learning as I go, I'm attempting a mapreduce on a dataset using mongoDB. So far I've converted the csv to json and imported it into a mongoDB using compass. In ...
0
votes
1answer
33 views

Watchlist polling API NoSql vs Sql Frequent Updates

I am making a watchlist type application that will get all items being watched and then poll an api every ten minutes or so to check on its status. I am trying to design the database portion of this ...
0
votes
1answer
141 views

MongoDB - Do subdocuments count towards the total size of a document

I'm wondering if you had something like a list and a subdocument of items. Does MongoDB save them all as a single document, or does MongoDB regard the subdocuments as independent documents. This is in ...
0
votes
0answers
20 views

mongodb/mongoose - ensuring uniqueness between two lists

So I currently have my list and item collection set up (mongoose). List new Schema( { items: { index: true, ref: "items", type: [ObjectId] }, ...
0
votes
1answer
91 views

Querying MongoDb after scheme change

The database schema of an application is rarely fixed, due to new development the schema has to change. This also applies to a schema-less solution like MongoDB. There is documentation on how to ...
1
vote
2answers
632 views

Should I use NoSQL (MongoDB) or SQL (postgresql) database for my application?

I am planning to build a live audience interaction webapp similar to Slido as practice/fun project. User groups: admins and anonymous users Admins: login create event (define event period and ...
1
vote
1answer
193 views

Should be using MongoDB lookup or bulk update the data?

I am developing a social network app, we chose MongoDB as the storage for our app and mongoose as an ORM. Everything was going smoothly until one dark day the client said he needs to let the users to ...
2
votes
1answer
72 views

Does using MEAN stack reduce the need for code and data structures compared to ASP.net with SQL?

I've been writing web applications for almost 10 years. The ASP.net stack has been my bread and butter and although it has a lot of great things about it, I honestly never chose ASP.net. It's just a ...
0
votes
0answers
29 views

GIS design for reducing of traffic and number of requests to server

I explore the world of GIS and try to elaborate an architecture of a GIS service with a lot of objects on a map. Currently, I'm loading all the items in the visible map area. In order to keep a map ...
1
vote
0answers
52 views

Design a “family relationship” in MongoDB

I have a members collection in MongoDB database where each document looks like this: { "_id" : "8801", "name" : "John Doe" } I need to store family relationships between members. That ...
2
votes
0answers
556 views

NoSQL data modelling for multi level nested documents

What kind of NoSql data modelling is best suitable for the following requirement? This can be visualised (NoSQL-Document) as a Collection of Records where each Record contains nested Documents.The ...
2
votes
1answer
189 views

How to make a basic database application, previously developed for 500 records, ready for 1 million records?

I have written a basic web app in PHP, using MongoDB as database engine. The app basically inserts records into database as they become available, and queries the database and displays the data as on ...
-1
votes
1answer
411 views

Real time Querying on Real-time Data

I have data flowing from Kafka into MongoDB real-time. This is just raw data and various APIs are served using this data in real time. The APIs respond using aggregation queries. However when data to ...
2
votes
2answers
297 views

creating nodejs apps in php/mysql framework with later on full step by step migration to nodejs in mind

I'm looking for the most efficient path to convert over time my own made php framework for nodejs and I believe that nodejs experts and specific developers who had their years working with apache/php/...
2
votes
2answers
90 views

Handling sort-order / display-order integer as a field in collection/table [duplicate]

Say we have a column in table or a property in a collection called "sortOrder" which simply is an integer which denotes which order it is to appear when displayed. I am trying to figure out the ...
2
votes
1answer
1k views

Implementing tags in object

In my app, I'm implementing a questionnaire system and I'd like to implement tags for questions -- very similar to tags in questions here or Stack Overflow. I wanted to get some advices on how to ...
3
votes
3answers
1k views

generate unique sequential IDs in microservices architecture

I'm working in the context of a (kind of) microservices architecture where services can have multiple instances that can create new documents in the same collection of a Mongo DB. There is a ...
1
vote
1answer
281 views

Votes database architecture

I want to create an app using MongoDB (NoSQL database) that allows people to vote on posts (simillar to Reddit). What's the recommended way to store votes for the users? Probably the database ...
0
votes
1answer
286 views

Micro service architecture : Solving complex queries owned by particular service

I am working micro service architecture and figuring out what is the best way to get complex data from a micro service. So for example : Let's say micro service A is owning data based on any CRUD ...
3
votes
2answers
311 views

Advice on application architecture using MongoDB for intense multiplayer game

I am working on a multiplayer collectible card game. Server side is node.js + websocket.io. I am now considering which database to implement. I got really intrigued by MongoDB, mostly due to the fact ...
2
votes
1answer
418 views

How to handle UI updates dependent on slow API responses

A side project I'm working on with some friends currently deals with an API interface that, for many reasons, is slow and cannot be changed to improve speed. I'm talking API responses that take ...
1
vote
0answers
48 views

How should I store a frequently accessed array with an unknown number of elements in mongodb?

I have a simple "Index" object defined as follows: { "position": 4, "value": 345 } And I'm trying to figure out the best way to store this object in a mongo database, assuming that: The "...
3
votes
2answers
112 views

Find incline of 50% within 30 minutes in a steadily increasing timeseries

I have a list of steadily growing values like 19:57(12.259), 19:58(13.101) stored in mongodb. Now I want to find out if the value grew 50% within 30 minutes within the last 3 hours. My first naive ...
0
votes
1answer
271 views

Normalisation Vs Join , trade-off

In RDBMS, goals of Normalization: Free the database of modification anomalies Minimize re-design when extending Avoid bias toward any particular access pattern First step involves avoiding ...
1
vote
1answer
2k views

Why is elastic search popular? [closed]

Elastic search is basically about indexing of data. In database world, Multiple indexes can be created on a MongoDB collection Collection in MongoDB can be schema-less. In MongoDB, BSON encoding ...
2
votes
2answers
2k views

OLTP vs OLAP - MongoDB

RDBMS design often emphasizes data normalization (especially 3 NF) for the sake of efficient transaction processing (OLTP). OLTP is the predominant use case for an RDBMS. Goals of Normalization in ...
-3
votes
1answer
105 views

maintaining indexing on json files

I have a directory which has approx. 100k JSON files. I want to retrieve a list of file names, where the file satisfies a set of conditions, with a filter condition in same format as we can pass the ...
-1
votes
2answers
841 views

MySQL 5.7 json type or MongoDB document?

I'am working on a project that use MySQL as RDBMS. Recently, we have to manipulate a big json data. So, the first solution that comes in mind, and for many reasons, is to cooperate mongoDB with Mysql ...
0
votes
1answer
37 views

Report based on MongoDB data

My application interacts with an external system. There are multiple request-response interactions for a single business case. This information (request and response messages) is also logged in ...
0
votes
0answers
47 views

Deriving data from MongoDB collections that are distinct for each website

Problem I need to display different data based on some set of long lists of rules. Rules are different for each website that would use my system. Each second, I fetch an everchanging data set from a ...
54
votes
4answers
11k views

Why is using MySQL for a dictionary website a bad idea?

I'm planning to design and set up a database to store dictionary entries (usually single words) and their meaning in another language. So, for example, the table Glossary must have entry and ...
0
votes
2answers
114 views

Questioning the impact of UUIDs

When I first played with a NoSQL database I become aware of the impact of UUIDs in a distributed system. MongoDB defaults to ObjectIDs, but I've always questioned in which cases UUID (RFC4122) would ...
3
votes
1answer
144 views

What is the canonical pattern for database design with MongoDB?

When it comes to laying out tables in transact SQL databases, like SQL-Server and Sybase, the classic approach to relational modelling is well established. (The authority being Halpin's book) ...
0
votes
1answer
245 views

Should I use mongoose / mongodb to handle my user REST session in nodejs? [closed]

I'm working on a project which has the following development strategy: Frontend: Angularjs Backend: NodeJs DB: Mysql I'm bulding a REST system with nodejs and I was wondering how should I handle the ...
10
votes
3answers
6k views

Should backend IDs be public or not on a REST API?

Based on what this guy says: http://toddfredrich.com/ids-in-rest-api.html Let assume he is right about using UUID to identify the api resources. Then I run into troubles trying to implementing it ...
0
votes
2answers
250 views

Abstraction from database - handling ID types

I am using MongoDB in a project, where relationships between collections are created via referencing a unique document ID of a special BSON ObjectID type. So I can have a School document like this: {...
2
votes
3answers
466 views

Using MongoDB for not scalable application?

I have mainly worked on RDBMS databases. Recently studied MongoDB and liked where we don't have to define schemas upfront. So application developers straightaway can start writing the code. Major ...
3
votes
0answers
114 views

How to model access rights in MongoDB versus SQL

I've started to implement a full MEAN-stack application (MongoDB, Express, Angular2, node) and I am struggling with the data design for the access management in the MongoDB. In my old thinking tracks, ...
2
votes
1answer
411 views

MongoDB schema for tracking matches

This is the first mongo-backed-application I am trying to make beyond tutorials, so I lack imagination when it comes to document schemas. Context: On a dating application, there is an algorithm that ...
3
votes
4answers
715 views

Using a relational and a non-relational database in the same project?

I ran into a problem on the project I'm working on right now. It is basically an app that stores a path based on GPS coordinates. The app runs on android an saves the GPS location every second and ...
1
vote
1answer
61 views

updating database items users are “subscribed” to

I have some categories that users can favorite and track, the actual category names and details are stored in the DB but the items belonging to each category are fetched via api. When a user adds a ...
1
vote
1answer
2k views

What is the query router in mongodb architecture of sharding?

I have read the guide and they say Query Router Sharding is transparent to applications; whether there is one or one hundred shards, the application code for querying MongoDB is the same. ...
1
vote
0answers
192 views

Relational DB sync to Mongo DB

I am currently working with a system which has been upgraded piecemeal from an original Visual FoxPro solution, to a system that now has the following parts: Local FoxPro installation (this is a ...
0
votes
1answer
288 views

MongoDB capped collections

I'm not really sure if that is right "stack" to ask that question, well two questions actually. What's the potential use for capped collections? (besides logging) Capped collections cannot be sharded,...
0
votes
1answer
302 views

Angular2 is based on the Angular-CLI, correct?

Angular2 is based on the Angular-CLI, correct? So When I run ng serve there is a machine spun up at localhost:4200. Now if I want to add a database, a lot of people end up packaging Node.JS along and ...
-1
votes
1answer
317 views

“OEM Embedded” vs “In-house Developed” Reports

We are developing a SaaS product with which we want to give our customers the ability to produce “real time” (i.e. users should be able to get response within seconds) reports. The “raw” (i.e. not ...
3
votes
3answers
808 views

Designing a Feed and Notification system in MongoDB

I'm developing a NodeJS API that will be consumed, for now, by an Android app. I need 2 important things here: a News Feed and a Notification system. And I need it to be scalable. I'm using ...