Best Database for ionic

Hi , i am new in this platform and want to use database in my app , i am confused which database is best for my app
the scenario is like this.

user will search for medicine name and in response
user will get pharmacy name and quantity of that particular medicine

so this is very short description to get idea what i want to achieve please guide
and if there is complete example of using database from scratch then please provide
i’ll be very thankful

This question gets asked a lot. You might want to search the forum. Lots of advice.

Edit: also, if you are new to the platform, it’s not a good idea to focus on Ionic v1.

Why not ? Can you be more talkative about your edit ?
I don’t see any problems to be honest.

You have a couple options dependent on how big of a database you mean here.
Ionic has a native SQLITE plugin( or one of the strongest web options right now is firebase.

Ionic v1 is barely supported. Ionic 4 is coming out soon. Why stay with version 1? Also, Ionic 1 is based on AngularJS, which is much less performant than Angular.

Thanks for reply :slight_smile:
i have only two tables in my database and the records around 3k in each table, the data which will be response to user will be fetched from both table
as i mention above
one table is pharmacy table which contain 4 cols id,name,latitude,longitude

 second table is medicine table which contain 3 cols id,name,quantity of medicine

so this is my scenario, which one is best for this particular prob ?

Well i’m pretty partial to firebase just due to ease of use. See : for a good example of firebase.

However if you know SQL the ionic native plugin would probably be easier for you.

EDIT: I have only used these with Ionic 2+

The first crucial question here is whether you want the data to be included in the app or stored on a server.

If stored in app, SQLite is hands down your best option. This allows offline usage, yet data cannot be changed/updated without reving the app.

If stored on server, everybody can have their religious arguments. I like PostgreSQL. This requires network access, but is easily updatable without changing the app, and you can also do access control and easy statistic gathering if desired.

no matter it is stored in app or on a server because i dont want to alter data later till rest of my life :smiley:
the best tutorials for sqlite ??? and for server too as i am looking for the easiest way to do this.

yeah this blog is great so far whatever i did in this app i got help from this blog, but this time it seems little tough :frowning: honestly i am looking for the most easiest way to achieve this :slight_smile:

If i understand this right It should be pretty easy to achieve in either one but for example, if you were to do firebase

public DBref = firebase.database.Refrence;
       id: id,
name: name, //etc

So you can achieve that for establishing either of the two nodes you would need to create for your data.
Calling lists from firebase is pretty easily achievable, I believe Josh Morony has a tutorial on that as well.