About Android SQLite

Source: Internet
Author: User

I recently learned about Android and saw a new term: SQLite. I can literally guess it is related to the database, but what does it mean? What does the android database look like? After a series of problems, you can check the Internet and share with us.

What is:

SQLite database is a lightweight and self-contained DBMS. It is portable, easy to use, small, efficient, and reliable.


SQLite is a very popular embedded database. It supports the SQL language and has good performance only with a small amount of memory. In addition, it is open-source and can be used by anyone. Many open-source projects (Mozilla, PHP, Python) Use SQLite.

SQLite is embedded into applications that use it. They share the same process space, rather than a separate process. From the external perspective, it is not like an RDBMS, but inside the process, it is complete, self-contained database engine.

One of the major advantages of an embedded database is that you do not need network configuration or management in your program. Because the client and server run in the same process space.

SQLite database permissions only depend on the file system, without the concept of user accounts. SQLite has database-level locking and no network server. It requires memory usage, but other expenses are very small. It is suitable for embedded devices. All you need to do is compile it correctly into your program.

SQLite consists of the following components: SQL Compiler, kernel, backend, and attachment. SQLite makes debugging, modification, and expansion of SQLite kernel more convenient by using virtual machines and virtual database engine (vdbe.

Advantages:
The biggest difference between SQLite and other databases is its support for data types. When creating a table, you can specify the Data Type of a column in the create table statement, however, you can put any data type into any column. When a value is inserted into the database, SQLite checks its type. If this type does not match the associated column, SQLite will try to convert the value to the column type. If the conversion fails, the value is stored as its own type. For example, you can put a string in the integer column. SQLite calls this "weak type" (manifest typing .).

In addition, SQLite does not support some standard SQL functions, especially the foreign key constraints (foreign key constrains), nested transcaction and right Outer Join and full outer join, and some ALTER TABLE functions.


Summary:
In addition to the above functions, SQLite is a complete SQL System with complete triggers and transactions.

Android integrates SQLite Database


Android integrates SQLite at runtime, so every android application can use the SQLite database. For developers familiar with SQL, using SQLite in Android development is quite simple. However, JDBC consumes too much system resources, so JDBC is not suitable for memory-constrained devices such as mobile phones. Therefore, Android provides some new APIs to use the SQLite database. In Android development, programmers need to learn to use these Apis.

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.