NOOB Question Apologies. (Large Lists of data)

I am creating an app for friend and essentially I want them to be able to type in a food, when found tells them nutrition information.

I plan to include as many food as possible so would I have to code all the different types of foods in my main.lua with the outcomes or is there some sort of database trick I can do?

Apreicate any help or input in advance.

Thanks

Depending on the number  and size of records, you may not want to keep it all in memory.  This is where a database comes in handy.  Corona SDK supports SQLite for things like this.

Another option if you have network connectivity is to use a remote database.  The benefit here is you can add more data to it without having to release a new app.  There might already be online nutrition databases that provide access through an API to access their data.

Rob

Thanks for your response. I thought it would include this.

Are there any tutorials or guides to set this sort of thing up?

In regards to a remote database I would need to host this somewhere. Are there companies out there that do this sort of hosting?

Thanks again

Most web hosting services offer MySQL databases and PHP to access them.  I have an older tutorial on setting this up that might help you get started:   http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/

There are also services like Parse.com that offer database in the cloud services.  Several people on here have build mod_parse modules that you can use to bridge your Corona SDK app with Parse databases.  You will need to google for them though.

Rob

Hi Rob,

Thanks for your reply. I think I want to create an Offline database first and then evolve from there.

What would you suggest the best method for this scenario?

For offline databases, probably SQLite

Depending on the number  and size of records, you may not want to keep it all in memory.  This is where a database comes in handy.  Corona SDK supports SQLite for things like this.

Another option if you have network connectivity is to use a remote database.  The benefit here is you can add more data to it without having to release a new app.  There might already be online nutrition databases that provide access through an API to access their data.

Rob

Thanks for your response. I thought it would include this.

Are there any tutorials or guides to set this sort of thing up?

In regards to a remote database I would need to host this somewhere. Are there companies out there that do this sort of hosting?

Thanks again

Most web hosting services offer MySQL databases and PHP to access them.  I have an older tutorial on setting this up that might help you get started:   http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/

There are also services like Parse.com that offer database in the cloud services.  Several people on here have build mod_parse modules that you can use to bridge your Corona SDK app with Parse databases.  You will need to google for them though.

Rob

Hi Rob,

Thanks for your reply. I think I want to create an Offline database first and then evolve from there.

What would you suggest the best method for this scenario?

For offline databases, probably SQLite