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 8715697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:54:35+00:00 2026-06-13T05:54:35+00:00

In most Android database examples, SQLiteOpenHelper is extended and contains information to create and

  • 0

In most Android database examples, SQLiteOpenHelper is extended and contains information to create and update the database. However, in many examples the helper class contains methods to add, delete, and return records. My question is would it be better to include these CRUD methods in the class that extends SQLiteOpenHelper, or would it be better to create a separate class with an instance field of the class that extends SQLiteOpenHelper, which contains all the CRUD methods? Would this just be a personal choice, or are there other issues I may be overlooking? I feel like creating a separate class may be better form. I appreciate anyone’s feedback.

  • 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-06-13T05:54:35+00:00Added an answer on June 13, 2026 at 5:54 am

    The code that creates/updates the database must know about the database structure, so it makes sense to put the other code that knows about the database structure into the same class.

    The resulting is not only about opening, so instead of MyOpenHelper, call it MyDatabaseHelper. 🙂

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

Sidebar

Related Questions

I'm trying to use my own database in an Android application. Most all the
Is Android 2.2 supports Carousel view? Because most of the examples I came across
I have created a database for my android app which contains static data and
I am developing an android application. I want to update the local SQLite database
I'm using Android's SQLite to create a database of levels, based on some files.
For my first and most awesomest Android project, I want to create a home
I understand most Android devices have a 16mb limit (24mb on Nexus One) on
I downloaded the most recent version of Android for Linux (android-sdk_r05-linux_86.tgz). I was trying
An android app I'm working on relies on a web page for most of
What is the most efficient way to port an iPhone app to Android? I

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.