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

Filter by
Sorted by
Tagged with
-2
votes
1answer
25 views

How to safe Consistency in DDD project in single aplication?

I want to design my project in DDD spirit. This is single aplication (not microservices) but with separate BC (as modules). Each BC have separate mongoDB collection. I have problem with communication ...
-4
votes
0answers
46 views

Designing first ever NoSQL database (MongoDB). Got questions around a simple example [on hold]

I have many years of experience with RDBMS.I am relatively new to NoSQL. And in current project that I am doing, I have to use MongoDB (As suggested by my client). In this there are tens of thousands ...
-4
votes
0answers
31 views

How to create an org where users share company data [closed]

Theoretically, how would one implement a model where companies have their own "org". The users in that company share access to the company's data and have their own logins. Many companies do this, ...
0
votes
2answers
78 views

How is there no hit in performance with MongoDB's new FLE?

MongoDB recently announced their new field-level-encryption method for helping tackle DB breaches. (https://www.wired.com/story/field-level-encryption-databases-mongobd/) In other articles it is ...
-1
votes
1answer
37 views

Hybrid solution using mysql and mongodb

I am developing a web app that uses a mysql database. I recently encountered some changes that require me to store 3rd party data having an inconsistent schema. I've decided to use mongodb as a ...
1
vote
2answers
127 views

Using a Single Collection for the entire application in MongoDB

It strikes me why most of the sites don't talk about this topic. Recently, I've been doing some extensive research when it comes to NoSQL schema design, and evaluating the different NoSQL options (...
1
vote
1answer
31 views

Logging web API POST requests for retry to outside service

My web API talks to an outside service running elsewhere, based on the web API requests (mostly POST). There is a message queue (RabbitMQ) that sits in between them, for request/response from either ...
-4
votes
1answer
649 views

What should I test with unit tests for data access layer? (MongoDB)

I'm working in TDD for my data access layer in MongoDB and I don't know what should I test? I think that I shouldn't test if the queries return what they have to return because It's a MongoDB concern....
1
vote
0answers
79 views

On fetching an item does the database read its whole content?

In my database (mongoDB) I have a model called exam and each instance of the modal has a somewhat large json object (500k). I'm using strapi cms to make the query, using graphql plugin. However when ...
-2
votes
1answer
57 views

Do I need a redis for caching object while MongoDB already cached frequently accessed items

I'm using mongodb for our web application. Recently I'm think of adding redis for caching objects which usually is the setting/configuration. But the mongodb already cached the frequently accessed ...
1
vote
1answer
60 views

MongoDB: Two documents of separate types that reference each other

I'm writing the back-end for a chat application. The database being used is MongoDB, which uses objects that have their own unique IDs. I've run into a problem; I have two document types, channels ...
1
vote
0answers
101 views

Refactor MVC to more scalable architecture?

Months ago I began a new web project which, in the beggining, seemed like a small application with virtually few users. I began the project by using the awesome Hackathon Starter WebApp Boilerplate by ...
1
vote
1answer
58 views

Ruby on Rails: primary SQL db and secondary No-SQL db without models

I have in mind to develop a Ruby on Rails app with two different databases. In the primary SQL db - let's say MySQL, for instance - I'd keep my app items, e.g. user profiling, user-user interactions ...
2
votes
1answer
161 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
28 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
154 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
64 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 ...
1
vote
1answer
739 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
1answer
311 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
2k 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
306 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
75 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 ...
1
vote
0answers
64 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
890 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
190 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
478 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
426 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
127 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
2k 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
2k 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
442 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
363 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
474 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
719 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
59 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
113 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
523 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 ...
2
votes
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
3k 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 ...
-2
votes
1answer
123 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
1k 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
39 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 ...
55
votes
4answers
12k 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
117 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
158 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
305 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 ...
11
votes
3answers
10k 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
282 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
513 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 ...
2
votes
0answers
193 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, ...