Harold
Lost but trying
Profile
Posts: 10
Reg: Aug 02, 2012
Sunnyvale
5,600
08/16/12 11:23 PM (13 years ago)

SQLite help for new app idea

I have an idea for an app that requires being able to store data and then recall it later. I have big plans for the app and several features I would like to build into it in phases so that eventually the information is available across multiple devices and possibly even on a website. After looking at the different data storage options on a mobile device (primarily local storage, or database using SQLite), I am under the impression that an SQLite database is the best option. Also, tutorials on SQLite seem more prevalent (I looked at @mySkylla's tutorial but had difficulty figuring out whee to start), however, I know that trying to tackle SQLite in my first app is probably crazy - but go big or go home, right? So that is the long way of asking if anyone has any suggestions on good SQLite tutorials? I found one by vogella with a good example Android project, but it is a little light on the explanation of what all the syntax (not sure if I used that term correctly) means so I am having a little trouble figuring out all the JavaScript. I have no programming experience so a tutorial that breaks it down to minute baby steps would be awesome. Or if anyone can think of a different way to approach this where I don't use SQLite but can still access the data across multiple devices and the Internet, that wold be great also. Thanks in advance for any suggestions.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/16/12 11:44 PM (13 years ago)
Interested in this as well. Fred suggests HTML5 localStorage quite often, but that wouldn't be appropriate in this case. If you want data available across multiple devices, and possibly in a website, I'm not sure the local SQLite database would work? How would another device access that info? You could very easily create a mySQL database on a web server somewhere that devices could access via HTML screen and PHP scripts. That's pretty standard stuff, and easy to implement. But, if you want to go the route of a device SQLite database, then I'm hoping somebody will chime in. As far as I know, nobody has cracked that nut yet. Mark
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/17/12 07:57 AM (13 years ago)
Cloud storage would be necessary for cross device / platform usage. That was probably Apple's reason for messing with localStorage. Fred
 
Harold
Lost but trying
Profile
Posts: 10
Reg: Aug 02, 2012
Sunnyvale
5,600
like
08/17/12 08:04 AM (13 years ago)
My idea with syncing data across devices is to have a copy of the database saved to a cloud storage site (e.g. dropbox), and a local copy on each device. When the app starts it replaces the database on the device with a copy of the database in the cloud. When any changes are made to the local database on the device it also replaces the database in the cloud. My hope is that having a local copy of the database on the device would allow the app to continue to work even if you temporarily don't have access to the cloud (e.g. lose cell coverage, no wifi connection, etc.) I am sure there are all kinds of syncing difficulties that will come up (e.g. what if two devices are accessing the same database at the same time, what if one device is making changes to local copy of the database but doesn't have access to the cloud while another device is making changes that does have access, etc.). But I figure I will take it one step at a time and the first step is a basic proof of concept. Linking this to a full fledged website it also much further down the line (do not be anxious about the things of tomorrow - tomorrow will care for itself).
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/17/12 08:08 AM (13 years ago)
I am sure there are all kinds of syncing difficulties that will come up (e.g. what if two devices are accessing the same database at the same time That's always been a problem with data. Fred
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.