Five data storage methods for Android and five data storage methods for android

Source: Internet
Author: User

Five data storage methods for Android and five data storage methods for android
1. Five methods for storing Android data

(1) SharedPreferences Data Storage

Description: http://www.cnblogs.com/zhangmiao14/p/6201900.html

Advantage: SharedPreferences is a lightweight application that is easy to use and concise.

Disadvantages: The storage data type is relatively simple (only the basic data type). It cannot be used for conditional queries and can only be used for complex storage requirements, such as saving configuration information.

(2) SQLite Data Storage

Description: http://www.cnblogs.com/zhangmiao14/p/6198167.html

Advantages: lightweight; all data is stored in the same file and can be freely copied; The SQLite Core Engine itself does not rely on third-party software and does not require "installation" to use it ", therefore, it can save a lot of trouble during deployment; cross-platform support for a large number of operating systems; B-Tree data structure is stored on the hard disk.

Disadvantages: Some SQL functions are not supported, such as foreign key constraints, nested transactions, RIGHT OUTER JOIN and PULL OUTER JOIN, and some ALIER TABLE functions. SQLite's performance in concurrent (including multi-process and multi-thread) read/write has never been ideal. The database may be exclusive to write operations, leading to blocking or error of other read/write operations.

(3) file data storage

Description: http://www.cnblogs.com/zhangmiao14/p/6208503.html

Advantage: it can store a large amount of data, which is relatively stable, easy to store, easy to operate, and safer (because it can control access permissions ).

Disadvantage: file updates or format changes may lead to huge programming work.

(4) ContentProvider Data Storage

Description: http://www.cnblogs.com/zhangmiao14/p/6212140.html

Advantage: a data storage method shared by applications,

Disadvantage: Implementation is troublesome.

(5) Network Data Storage

Description: http://www.cnblogs.com/zhangmiao14/p/6213740.html

Advantage: for very important real-time data that needs to be sent to a remote server for processing, real-time network transmission is required.

Disadvantages: You need to connect to the Internet, consider the stability of the network, and generate traffic.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.