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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:20:18+00:00 2026-06-08T13:20:18+00:00

I have the following data structure for a movies SQLite db (i will keep

  • 0

I have the following data structure for a movies SQLite db (i will keep it simple , the real tables have more fields):

  • genre – (id , name)
  • movie – (id , genreId , name , year)
  • scenes – (id , movieId , name)

for example:

  • genre – (7 , thriller)
  • movie – (250 , 7 , The Sixth Sense , 1999)
  • scenes – (15 , 250 , I see dead people)

I have the data stored in an SQLite db on my Android app.
I have a data manager class that I use to retrive relevant data.

I need to be able to do the following:

  • get ALL genres
  • get ALL movies per genre id (+ the abbilty to sort according to different fields)
  • get a SPECIFIC movie item according to movie id
  • get ALL scenes according to movie id
  • …

I would like to know, performance-wize, what is the better way to approach this data:

  1. perform a SQLite query every time I need to get data.
  2. after getting data once from th db, store it in an array list and thus keeping it in memory, for example – ArrayList of genres, where a Genre object holds an array list of Movie objects…
  3. same as option 2 but with hash maps. in that case – when looping over the map, is there a way to control the order of the objects?
  4. any other option that comes to mind?
  • 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-08T13:20:20+00:00Added an answer on June 8, 2026 at 1:20 pm

    Usually, you retrieve data from database and use CursorAdapter to represent data in a ListView. So, I guess this is the most effective way. If you have different activities for your tables, until activities are destroyed they will store your data in memory.

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

Sidebar

Related Questions

I have the following data-structure as a class named Task: private: string name; int
So I have the following data-structure coming back from my server. {date:'2/1', name: 'product
I have the following data structure: public class Person { public string Name{get;set;} public
I have following data structure (simplified): A giant list of the class TestClass public
I have the following data structure: P_ID EVSSMIN EVSSMAX TDMIN TDMAX WARD SYRINGE_ID COMBINE_WITH
I have the following data structure (an atomic vector?) output from daply in plyr
I have the following JavaScript data structure. a[] is an array with text strings
I have the following data set structure: date time_in_hours price Sep 03 08 9.76
I have something like the following data structure: Category StartDateTime EndDateTime =============================================== 1 12/1/2009
I have an odd linq subquery issue. Given the following data structure: Parents Children

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.