Database options


#1

So I’ve read just about every topic listed that deals with databases and have yet to figure out a way to implement a db for the app I’m working on. I need to make an application that would be able to track daily activity. Nothing too crazy, I’m just trying to get some more practice and learn.

Id like to be able to have a user create a job (DB) and then submit tasks and date/timestamps to the database. Once I get some more experience, I can add more functionality. I have very little experience with building databases at the moment.

Another issue I am trying to figure out is how I can have the user create the database within the app so that this app can just be downloaded, installed and be ready to go without having the user install more packages or tools.

If anyone has any links to tutorials or has any recommendations that’d be great.


#2

If you’re still learning Electron, I would recommend just using a file stored on disk as your “database”. From your description, it sounds like you’re trying to build a todo list app (or maybe what I call a “done list” app like a food or activity tracker)? You don’t need anything fancy for an application this simple. As an example, check out the Todo.txt specification.


#3

Thanks leedohm. I will look into this. What about a database option for storing incoming realtime data via serial data? I will need to store about 5-10 variables to start and possibly more. This would be with the intent to later on be able to graph, plot, and analyze this data. I looked at sql and mongoDB but I just don’t understand how to have the app I’m creating be able to create the db when I create the job within the app. The software I currently use through my work uses a MS Access db which is relational I believe, so something similar would work. I could go either way though (RDBMS or NoSQL). I would like for the user to be able to create/access multiple jobs and for the app to be able to load other dbs by simply importing the db files. What would be the best option for this?


#4

This is a really open-ended question that would require a lot of knowledge around the speed of incoming data, what should the database be optimized for (OLTP vs OLAP and probably others I haven’t heard of), whether you actually need relational features, what ACID guarantees you expect, and more. You may want to take a look at places like http://dba.stackexchange.com or tutorials on sites like https://www.khanacademy.org if you want to self-educate.

These are all design decisions that are separate from using Electron and are off-topic here.