Beginner's Database Question


#1

hi, im just starting to learn Ionic and would like some help. Like to know whats need to be learn if i want to create an apps with a database to store user’s info like login id/password, expiration date, etc?

hv search the web and most suggest firebase, backand etc. but i would like something that is ‘independant’(self-host) as if the apps is successful and got a lot of users in future, it will be very expensive compare to self-host.

what i like to ask is, what technology/platform should i focus on - sqlite, mangodb, angularjs etc? and where could i get more info on the matter?

thank you very much.


#2

Ionic itself runs on AngularJS.

Database-wise, it all depends whether you want a local copy of the device, as well as a server hosted. Speed is also a factor, as well as the amount of data.

If the data will only be hosted on a server, you can use a MySQL and Laravel stack, or you could use CouchDB. There are plenty of server-side databases.

If you want a local copy stored on the device, you could use CouchDB and PouchDB together and run a sync.
Although, PouchDB is a bit slow when running with a lot of data, as well as it does not fully support SQL queries, so filtering data would have to be done manually.

Personally, I use MySQL and Laravel as a backend, as well as giving the user the option to sync the data on their device, using AlaSQL as a local database with the FileStorage engine for persistence.
I have found as a local database AlaSQL has the best speed for large databases.

I hope this has helped you, and given you an idea.


#3

hi, what we need is very simple(we thought) - the app will fetch the user’s info from the server and display to them after they successfully login with an id/password.

and we as admin(backend), could have another app/webpage that have special privilege that could add/edit/delete user’s acc and their info.

Please advice. Thank you.


#4

What sort of information is included in “the user’s info” you envision here?


#5

The info we have in mind now:

  1. userid
  2. password
  3. status
  4. expiration date
  5. fav number1
  6. fav number2
  7. fav number3

and the backend will have the ability to push/broadcast info to all the user base on their userid. For eg.
user1, data1, data1
user2, data2, data2
.
.
.

thanks,


#6

You really don’t want to be storing passwords in your database. Use bcrypt or something to store hashes of them. What I was getting at in my earlier comment is that if you have any sort of sensitive personally identifiable information in there, I would strongly suggest getting somebody involved with the project that has experience in the arena.


#7

this is just a hobbies so we dont have budget to get help :stuck_out_tongue: but could you point us to the correct path? how/what will you use to create this type of apps? ionic+angularjs+mysql?