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

  • Home
  • SEARCH
  • 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 7567149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:35:35+00:00 2026-05-30T14:35:35+00:00

I am extracting a database using query, what is the best practice to store

  • 0

I am extracting a database using query, what is the best practice to store the data temporarily. Currently i am using ArrayList to hold the data extracted, but i am thinking that might not be best design practice.

Thanks

            Cursor cur5 = database2.rawQuery("select ID from Quote where EmoticonID=? and SubCategoryID=?" ,new String [] {Integer.toString(gcid), Integer.toString(scid)});
            if(cur5.getCount()==0){
                 Log.i("TAG Screen3", "No Quotes ID found for Particular ID");

                 if (helper2 != null) {
                    helper2.close();
                 }

                 if (database2 != null) {
                    database2.close();
                 } 
         }else{

            cur5.moveToFirst();

         do {
                quoteid.add(Integer.parseInt(cur5.getString(0)));
                Log.i("TAG Screen3 Quote ID", (cur5.getString(0)));

            }  while (cur5.moveToNext());

            if(cur5 != null){
                cur5.close();
            }

            if (helper2 != null) {
                helper2.close();
            }

            if (database2 != null) {
                database2.close();
           } 
     }    
  • 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-30T14:35:36+00:00Added an answer on May 30, 2026 at 2:35 pm

    Well if you already have a database to get the data from, why not using that database as temp store. Just get the data from the database when you need it an skip the temporary storage.

    If you still want to store it locally on your phone I suggest a local sqlite database for huge objects or POJO’s. If you have primitive types of key-value pairs you should use SharedPreferences.

    For more information see http://developer.android.com/guide/topics/data/data-storage.html.

    Or give us some information about your data and what you intend to do:) That might help us in helping you 😉

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

Sidebar

Related Questions

We are extracting data from an oracle database to a file using C# oracleDataReader,
I am encountering a problem while extracting info from a database using php+mysql and
I am currently designing a correlation engine in java which is extracting data from
I've currently got a tool which allows me to configure a database connection (using
I am currently in the thinking process of the data structure I might use
I have problem extracting data of the Oracle custom type from the database. One
Using JQuery, I'm extracting the value from what is essentially a query box for
I need some help extracting the following bits of information using regular expressions. Here
Using C# how should I go about extracting titles subtitles and paragraphs from a
I am trying to index a table in a database using Lucene. I use

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.