Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1106143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:44:46+00:00 2026-05-17T01:44:46+00:00

My Android app is reading and writing to a local SQLite DB from a

  • 0

My Android app is reading and writing to a local SQLite DB from a few different Activities and a Service. Pretty standard. But I’m not happy with the way I’ve got all the DB details stored as constants that I then use anywhere I access the DB. I’ve been advised to wrap the DB in a ContentProvider. Sounds good to me. While I’m refactoring my code, I figured I’d ask:

  • What are your best practices for local DB data storage in Android?
  • Where and how do you store “CREATE TABLE” statements, column names, other SQL?
  • Would you mind sharing a list of the classes you instantiate and what goes into each (ContentProvider, DatabaseProvider, DatabaseHelper…)?
  • How do you coordinate the structure of your local Android DB with a server-side DB available through a REST interface?

Yeah, I realize I’m getting at the perennial “where’s the Android object-relation-mapping framework?” question. For now, I’m mainly curious to hear how you structure your Android apps with what’s available in the standard SDK.

As always, thanks for the pointers!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:44:47+00:00Added an answer on May 17, 2026 at 1:44 am

    We have been tuning ORMLite on Android for a while now and it is working well. ORMLite supports Android with native database calls and also supports other databases via JDBC. You annotate your classes/fields and use base DAO classes to persist to SQLite.

    • CREATE TABLE statements are handled my ORMLite’s utility classes. Most SQL is taken care of by the DAO classes.
    • The Android section of the online documentation explains the class hierarchy. You implement a DatabaseHelper which helps create an update your database. Your activities extend OrmLiteBaseActivity (or service or tab) which gives access to helper and DAOs.
    • ORMLite does not provide a solution for merging with remote REST servers.

    Hope this is somewhat helpful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The android app reads from database but doesnt write anything to DB, the app
I am writing an app for android which uses InputStream from Socket . I
I am trying reading a Pdf file from android app. It builds an app
I was reading this two docs about Service in the Android SDK http://developer.android.com/reference/android/app/Service.html http://developer.android.com/guide/components/services.html
In my android app i am reading a file but require anly the data
I'm having trouble reading in from a .CSV file in an android app. Mainly
I was reading over http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html But I'm really not grasping how to ignore certain
I saved my project.apk file, and I was reading this document: http://developer.android.com/guide/publishing/app-signing.html#setup and they
My Android app looks great at 480x800 pixels resolution but it breaks at LDPI
I'm playing around with reading the signal strengths in a small Android App, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.