Tuesday, 4 August 2020

Database recommendations

I have made a voting application that takes users votes, then after a few seconds or minutes an admin can stop the voting and reveal the results. The results will then show as a poll to the users.At the moment, I'm just storing everything in memory as at most there will be a few thousand votes.The client has an event coming up where there might be 100,000 users using the application. I'm not too keen on using in app memory for this.What database would you use? I'm using express already. I come from a PHP background so my go-to for things like this would be MySQL, but I don't know if that is a dated approach or if there is a more "express friendly" database that would be better. I have no hate for MySQL, and would be happy to use it, but this project is also an opportunity for me to try out a more modern stack and keep myself up to date.The rows that will be created will be tiny, at most:userId | questionId | answerId There may also be a team logic, where votes will be grouped into teams:userId | username | teamId But the essential functions I'm after are count by query i.e. "How many people answered (a) on question 1" and a tiny bit of relational logic i.e. "Which team are the users on". I've used Firestore in the past, although I struggled to get the counts working correctly (I don't believe there is a native count, without retrieving all items).It also needs to run quickly with 100,000+ rows, but my understanding is that most databases will be fine with this (other than maybe SQLite?)Any advice would be much appreciated.

Submitted August 04, 2020 at 10:05AM by Whale_Eating_Cheese

No comments:

Post a Comment