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.