Embedded Database SQLite

Source: Internet
Author: User

SQLite Yes D. Richard hipp In 2000 A small embedded database developed in the year. It is completely independent and does not have external dependencies.

 

And common database management systems ( For example MySQL And Oracle And so on ) In SQLite There is no concept of a database server. ApplicationProgramYou do not need to establish a network connection with the database service in advance, but use SQLite Function library to save, query, modify, and delete data. All Database-related operations are performed by the function library in a unified manner. In this way, whether multiple processes in the system or multiple threads in the same process, you can call the function to access the database at the same time. The underlying data locking, transaction logs, and storage management are SQLite Function library. They are completely transparent to applications.

 

SQLite Standard SQL The statement must call a dedicated API . These API Provides query, insert, and delete functions. For example Com. sleepycat. DB. DB Class represents the database object. DB Class Put () The method completes the insert function; Get () The method completes the Data Reading function. ; ; Com. sleepycat. DB. DBC Yes Berkeley DB Provides the ability to traverse database records.

 

SQLite Although it is an extremely lightweight relational database, it retains most of the features of the database, Provides Sql92 Standard Support: supports multiple tables and indexes, transactions, views, triggers, and a series of user interfaces and drivers; supports atomic, consistent, independent, and persistent (Acid) Transaction features. Zero Configuration (Zero-configuration) No installation or management is required. A complete database is stored in a single disk file. Database files can be freely shared among machines with different bytes. Supports database size 2 TB . String and Binary large objects (Blobs) Only the valid memory size is limited. The source code is small and is smaller 250 KB . Some operations are faster than those of the relational database engine. Easy to use API .

 

SQLite Provided C Language API Interface to make database operations very simple, mainly 3 Items API Function call. SQLite Interfaces are some already compiled C Library, even if you use different languages API , Still used at the underlying layer C Library execution. SQL The statement enters the efficient SQL Compiler, consisting of a Tag Processor (Tokenizer) Split into query Analyzer (Parser) The identifiers that can be recognized, and then the analyzer re-combines and callsCodeGenerator (Codegeneratot) Generate a virtual machine code and hand it over to the Virtual Machine (Virtual Machine) Complete the execution SQL Task specified by the statement. Virtual Machine is SQLite The core of the internal structure is not only to complete all operations related to data operations, but also an intermediate unit for information exchange between customers and storage. Database according B Tree (B-tree) In the form of storage on the disk, through the page buffer can be adjusted to obtain the Rapid Search and storage of data. To facilitate transplantation, SQLite Use an abstract layer interface (OS Interface) Connect to different operating systems.

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.