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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:55:37+00:00 2026-06-05T09:55:37+00:00

I can’t choose between SQLite and SharedPreferences. I can use JSON.parse(SharedPreferences.getString(data,qweqwe); and s.putString(key,JSON.stringify(JSONObject)); Or

  • 0

I can’t choose between SQLite and SharedPreferences.

I can use

JSON.parse(SharedPreferences.getString("data","qweqwe");

and

s.putString(key,JSON.stringify(JSONObject));

Or create a new, big class to store my (text) data in SQLite. (PS: JSON.* is my own class)

What will be faster, better?

I know that SharedPreferences is for “key-value” data, SQLite – for big amount of structured data. But in my case storing JSON-formatted data in SP and accessing by key would be easier. Main question – will it be slower or faster? Pros and cons?

  • 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-05T09:55:38+00:00Added an answer on June 5, 2026 at 9:55 am

    I thought about this and had some practice.

    So, using SQLite (in my case) is better that using JSON-formatted string in SharedPreferences, because I can just update only one-two rows from a table. With SharedPreferences I have to:

    1. use new JSONObject(sharedPreferences.getString("json_string","qweqwe");
    2. some manipulations with object
    3. edit my SharedPreferences.
    4. seasoning to your taste
    5. Put my JSONObject().toString() back into SharedPreferences. It’s all.

    IMHO, it’s more complicated for the device. Because it cannot be seasoned

    If I wouldn’t need to update an individual parts of data, I’d rather to use SharedPreferences, because for static data, which I don’t need to update, is faster.

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

Sidebar

Related Questions

Can someone recommend an up to date library for data Sanitization in PHP ?
Can anyone give me an example of how to return the following json simply
Can PHP PDO extension bind nested objects automatically ? I mean using foreign key
Can someone guide me on a possible solution? I don't want to use /bin/cp
Can anyone explain me what's going on? I use this method - (BOOL)shouldAutorotateToInterfaceOrientation:( UIInterfaceOrientation)interfaceOrientation
Can we use the asterisk character * for a search action in SQL database?
Can you tell me what is the difference between abstraction and information hiding in
Can any one please tell me what is the difference between Task and Process
can anyone help me in trying to check whether JavaScript is enabled in client
Can 2 or more equations defining a function in Haskell share the same where

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.