A brief discussion on SQLite database

Source: Internet
Author: User
Tags sqlite sqlite database

There are many ways to store your Android data:

    1. Sqlite

    2. Sharedpreferences

    3. ContentProvider

    4. File Store data

    5. Networked Storage data




Here's a look at the SQLite database.


SQLite is a lightweight database that is processed faster than MySQL, PostgreSQL

such as open source database management system faster, no server process, through the file Management database, Android provides some API to operate the SQLite database, very simple and practical. The Android program integrates SQLite at runtime, so every Android program can use the SQLite database.




The Android SDK provides a series of classes and interfaces for manipulating the SQLite database, so simply say:


1.SQLiteDataBase class.

This is a database access class that encapsulates the API for a series of database operations and crud the data.




2.SQLiteOpenHelper class.

This is an abstract class that is used to create and make version updates. Subclasses of Sqliteopenhelper get the Sqlitedatabase instance object through the Getreadabledatabase () method and the Getwritabledatabase () method.



3.Cursor interface.

A cursor interface, as a return value in the database, equivalent to the result set resultset.



The SQLite database is used in the previous Android app and Android aircraft wars, so no instances are given here.

A brief discussion on SQLite database

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.