Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

What is the right tye of database I should use ?
Started by alzaabi98 Jan 15 2014 08:47 PM

- - - - -
11 replies to this topic
databse
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

alzaabi98

[GLOBAL: userInfoPane.html]
alzaabi98
  • Starter
  • PipPipPipPipPipPip
  • 251 posts
  • Jedi

Hi Team,

 

I was going thru some tutorials about the database and I read few blogs about how to create database using sqlite3 or how to read from remote MySQL database. Sometimes I saw code that read database from remote and then create SQLite to work with in the app (as I understood it.. maybe I am wrong)...

 

I hope someone can explain what is the difference between using SQLite or using MySQL in the apps. I am planning to develop an application that will be used by employees so they can register, login then find some services in the app.

 

I hope someone can help me understand the diff and when to use what..

 

Thanks in advance..

 

Abdul



[TOPIC: post.html]
#2

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Pro
  • PipPipPipPipPipPip
  • 2,601 posts
  • Jedi

MySQL databases typically are hosted on a remote internet server. You use them in apps that have to upload or download data to/from the internet. The mobile app can only use SQLite running locally on the device for database services. For smaller data storage needs you can go with storing JSON files on the device as well. Hope this helps.



[TOPIC: post.html]
#3

alzaabi98

[GLOBAL: userInfoPane.html]
alzaabi98
  • Starter
  • PipPipPipPipPipPip
  • 251 posts
  • Jedi

Thanks Ksan ,, let us expand on this if you agree... what about applications which use login/password ,, search for information, add records , remove records. modify profile etc... what is the best approach ?



[TOPIC: post.html]
#4

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Pro
  • PipPipPipPipPipPip
  • 2,601 posts
  • Jedi

It all depends. Who use the app, how is the data used? Shared? Updated on one mobile app need to be shared with other app users etc? 



[TOPIC: post.html]
#5

alzaabi98

[GLOBAL: userInfoPane.html]
alzaabi98
  • Starter
  • PipPipPipPipPipPip
  • 251 posts
  • Jedi

yeah .. the data should be shared ,,, I  meant every user can request for a service ( driver for example ,).. also can view the services (drivers available from place x to place y with prices ). he can contact them or write to them...

 

also the user can add service. For example if the user is driver , he can add record with his service...

 

the same concept can be applied for other services..

 

it is important to be secure app in terms every one should register/login ,, he can maintain his profile.. add/view services,,

 

I hope this info is clear,,



[TOPIC: post.html]
#6

alzaabi98

[GLOBAL: userInfoPane.html]
alzaabi98
  • Starter
  • PipPipPipPipPipPip
  • 251 posts
  • Jedi

Team,,

 

any advice in this topic,

 

Regards

Abdul



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Corona Staff
  • 8,563 posts
  • Jedi

This sounds like a need for a hosted database like MySQL.  If the service doesn't exist yet and you're creating it from scratch, you might want to look at Parse.com.  I know there are several community members building libraries to make it easy to integrate Parse with Corona. 

 

If your service already exists and they have a REST based web API to access the data, then you can use Corona's network.request() API to get data from the service and send data to it.  Hopefully that's well defined.  If you're working with a team of people and have the back-end engineers to make this happen, they should work with you to provide a REST based solution and that should handle the authentication. 

 

Locally you would probably store their credentials so they don't have to re-enter them all the time but that can be saved in flat files.  There are a couple of functions you can find in the community code that will save a Lua table to storage and load it back in easily.

 

Rob



[TOPIC: post.html]
#8

alzaabi98

[GLOBAL: userInfoPane.html]
alzaabi98
  • Starter
  • PipPipPipPipPipPip
  • 251 posts
  • Jedi

Thanks Rob for the detailed answer,

 

actually i am doing this alone for a purpose of learning. i want to build simple app but allow users to register to add the services and so on.. :)

 

i thought it is simple using some sort of APIs.  I will dig into this and see if i can make it work.. i am thinking also to use php and mysql to work with network.request as you mentioned .. let us see ..

 

thanks 

Abdul



[TOPIC: post.html]
#9

thedavebaxter

[GLOBAL: userInfoPane.html]
thedavebaxter
  • Basic
  • PipPipPipPipPipPip
  • 509 posts
  • Jedi

Take a look at this for Parse -

 

http://www.develephant.net/a-parse-com-module-for-corona-sdk/

 

Obviously you can roll your own using PHP and mySQL and if it's for learning purposes then I probably would.

 

Dave



[TOPIC: post.html]
#10

alzaabi98

[GLOBAL: userInfoPane.html]
alzaabi98
  • Starter
  • PipPipPipPipPipPip
  • 251 posts
  • Jedi

thedavebaxter,

 

Do you mean Parse allow to host php and mysql for free ?

 

Regards

Abdul



[TOPIC: post.html]
#11

thedavebaxter

[GLOBAL: userInfoPane.html]
thedavebaxter
  • Basic
  • PipPipPipPipPipPip
  • 509 posts
  • Jedi

No I mean if your learning then use PHP and mySQL if you want to learn them technologies. You can find free hosting if you search, if not I pay £2.99 a month.

 

Parse is a different thing and your best having a look around their site to see what is does.

 

Dave



[TOPIC: post.html]
#12

eja

[GLOBAL: userInfoPane.html]
eja
  • Enterprise
  • PipPipPipPipPipPip
  • 120 posts
  • Jedi

thedavebaxter,

 

Do you mean Parse allow to host php and mysql for free ?

 

Regards

Abdul

 

Parse allows you to manage/save/create all of your backend data. So the need for MySQL and PHP gets removed all together.




[topic_controls]
[/topic_controls]



Also tagged with one or more of these keywords: databse