Ionic and MySQL database


#1

I’m developing a new app with ionic2 with MySQL database.
I need to know how can I get and post data from ionic list input to a database table?
need your help.
thanks in advance


#2

You need to build a REST application server that accepts HTTP requests and talks to the database.


#3

if you want, try using sqlite which ionic does support.

But if want that MySQL database to be used, like @rapropos said, your gonna have to build some backend that is an RESTful application which you can set Url’s for your ionic2 application to hit, to Get, Post, Put, Delete, etc. to your database.


#4

Hey there! I’m also interested in connecting my Ionic app to a database, but I’m unsure which to use, SQLite, which appears to be more of a local filesystem on the phone, or a back-end connection with a MySQL or MSAccess dektop database.

I found a connector to Node.js on the MySQL website, which appears to be a new addition to their line of community downloads, but I am not certain if this will help.

The database and application I am creating are intended to keep record of our school’s IT assets, (desktops, monitors, et cetera) and enable rapid mobile access to that information when we’re not at a computer. I have a barcode scanner integrated into the app, but as of yet there is no connection to a database, and I am at a loss as to which option is best for my situation.

I suppose my main question is, would it be possible to link my app with an Access DB, and if so, would it be easier or better to do that rather than create a database in MySQL?

Any help is appreciated! Thanks!

PS- I’m in a time crunch to get this done, so if anybody sees this, I would LOVE to get help well before Friday!


#5

You can use any database which is suited for your application.
MSAccess is too old for a modern day app. MSSQL will do or better go with postgress.

About the architecture:
As already mentioned in the previous posts, all the mobile app mostly work through API calls i.e. data is stored on a remote server and app just calls it and fetch the data and in case of saving, it again sends the data through POST call.

Another thing is, local db which reside in app i.e. in the user mobile itself, can also be a good choice to store temporary data as users may not have Internet connection all the time.

You can go with whatever way suitable for you


#6

Thank you, this helped me to understand a bit better. I will look into SQLite and MSSQL to see whether one or both meets my needs. Thank you again!