Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android

How to set up SQLite for Android app development

Parse is a quick and easy way of setting up a backend for android apps. I'd like to implement my own backend with SQLite. Anyone know of any quides or resources

2 Answers

Juan Santa Cruz
Juan Santa Cruz
5,596 Points

So looking to add a backend service?

Well to do that you need backend server which can host such database. Ideally you can use webserver framework such as ruby on rails and then you can create a RESTful api to communicate from android app to the server.

Check this out... http://stackoverflow.com/questions/10116843/backend-server-provider-for-mobile-apps

Evan Anger
STAFF
Evan Anger
Treehouse Guest Teacher

The nice thing about SQLite is that it is intended to be designed for on-device functionality. Typically, when people use SQLite they are using it without calls to a "backend" server. So you can just use it locally on device without server calls. So if you want to consider using SQLite on device here is a good place to start -> http://developer.android.com/guide/topics/data/data-storage.html#db

Now if you want to have this SQLite database setup on a backend server its worth noting that most server side solutions will use a heavier database stack like MS SQL Server, Mongo, MySQL, etc because they can afford a larger installation on the server as well as capacity to run it. Thats not to say SQLite isnt impossible as there are sqlite libraries and extensions in most languages. For instance here is one for ruby https://github.com/sparklemotion/sqlite3-ruby