All Questions
21 questions
-3
votes
1
answer
186
views
Ways & Methods switch between MongoDB Database after selecting a country. (MERNG)
I have a concept in which a user selects a country, which will either filter or go to that database; I was thinking of alternatives or options that would help in the process. These are my first plans ...
0
votes
0
answers
281
views
How to implement notification system based on time that runs in regular intervals
I have a MySQL database with nodeJS server. I want to implement a notification functionality which is as follows. Once a user registers, I want to (inform) send some particular information to the user ...
1
vote
5
answers
469
views
OOP applications and Databases
I am having such a hard time with OOP and databases. Both in C++ with SQL and even more so with Node.js and MongoDB. For this question I will use Node/Mongo.
Let's say we have a user object. Over time ...
0
votes
1
answer
43
views
Inserting dissimilar excel files in SQLdatabase
I have a bunch of excel files(Multiple sheets) with some data of similar types, but i'm having troubles when this data has to be inserted in SQL DB. the data in these files are unordered (eg: the ...
4
votes
2
answers
8k
views
Is it okay to keep open the MySQL database connection open through out the Application or open and close connection query-wise?
I'm developing a REST API using Nodejs along with MySQL as the database.Is it okay to keep open the MySQL database connection open through out the Application or open and close connection query-wise ? ...
-3
votes
1
answer
219
views
Is splitting unit tests from integration test with mocks worth the effort (in nodejs)?
Well consider a relative simple server for a SPA application. Written in nodejs with express and knex as backends.
Now if we do it properly each function will have unit tests (as they are always all ...
2
votes
2
answers
154
views
How should I store time stamps so that it's easily accessible and won't take too much space
tldr at the bottom if you don't want to read all this! :)
First of all the db I'm using is MongoDB! So I've been building a fun project and all has been well but I hit a small problem. Effectively, ...
2
votes
2
answers
1k
views
Storing unchangeable data in database vs in code
Hi I am trying to create a role based dynamic route authorization system on my NodeJS ExpressJS powered API server.
Scenario:
There will be some roles like Admin, StandardUser etc. and they can't be ...
1
vote
1
answer
818
views
Write complex query OR write simpler queries and combine the results in Backend service?
Take the following statement for example:
'Get results for ALL Active students of a Course'.
Naturally, this query has 2 parts,
Get all active students of the course.
Get results of those active ...
-2
votes
1
answer
230
views
Database with auto-expiration
I am midway through my software development project in Node.js and have encountered a fork in the road. I need to create a "database" or a JSON file, that will automatically delete an entry after it ...
2
votes
1
answer
983
views
How to manage breaking updates in an API & database
So I have been working on my mobile app for a while and it is live and in production.
Because we released the app prematurely and are continuously improving current features and making them more ...
0
votes
1
answer
127
views
Temporary users to restrict db access of query?
I am new to database managment, and I am wondering if it is a good idea to create temporary users to restrict access to only a single table.
Like having an user named _logs can only (read?) and ...
3
votes
2
answers
610
views
How to test database dependent functionalities?
I have written this function which checks if a user already exists in the application:
async function ValidateUserExists(username, email){
if(!username || !email) throw new Error('Invalid number ...
2
votes
1
answer
229
views
What is the best way to maintain synchronicity between a table that has a list of another table?
I used to do Java development and with JPA, I don't really have to worry about the synchronicity between a table and the lists it owns. For those who don't understand what I mean, here's an example.
...
3
votes
0
answers
850
views
How do I implement Socket.io Leaderboard using AWS Dynamo DB cost-effectively?
Every time a user submits a score, Socket.IO causes all the users get their leaderboard updated. This causes every single user connected through Socket.IO to read from the Dynamo DB database (every ...