English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

SQLite Overview

This chapter can help you understand what SQLite is, how it differs from SQL, why it is needed, and how it handles application databases.

SQLite is a software library that implements an embedded, serverless, zero-configuration, transactional SQL database engine. SQLite is one of the fastest-growing database engines at present, but this growth in popularity is unrelated to its scale. The source code of SQLite is in the public domain.

What is SQLite?

SQLite is an in-process library that implements an embedded, serverless, zero-configuration transactional SQL database engine. It is a zero-configuration database, which means like other databases, you do not need to configure it in the system.

The SQLite engine is not an independent process from other databases; you can statically or dynamically link it to your application as needed. SQLite accesses its storage file directly.

Why choose SQLite?

  • SQLite can run without a separate server process or system (serverless).

  • SQLite comes with zero configuration, which means no settings or management are required.

  • The complete SQLite database is stored in a single cross-platform disk file.

  • SQLite is very small and lightweight, with the fully configured memory less than400KiB, while the omitted optional features are less than250KiB.

  • SQLite is independent, which means there are no external dependencies.

  • SQLite transactions fully comply with ACID, allowing secure access from multiple processes or threads.

  • SQLite supports SQL92(SQL2) standard.

  • SQLite uses most query language features in the ANSI-C written, providing simple and easy-to-use APIs.

  • SQLite is available on UNIX (Linux, Mac OS-X, Android, iOS), and Windows (Win32,WinCE,WinRT) are available.

SQLite history

  • 2000 AD-D. Richard Hipp (R. Richard Hipp) designed SQLite to run programs without a management program.

  • 2000 AD-8Month, SQLite 1.0 was released together with the GNU database manager.

  • 2011Year-Hipp announced that the UNQl interface will be added to SQLite DB and UNQLite (a document-oriented database) will be developed.

SQLite limitations

The following table lists several SQL features not supported in SQLite92Characteristics.

Serial NumberFunctions and descriptions
1

RIGHT OUTER JOIN

Only LEFT OUTER JOIN is implemented.

2

FULL OUTER JOIN

Only LEFT OUTER JOIN is implemented.

3

ALTER TABLE

It supports the ALTER TABLE command variants RENAME TABLE and ADD COLUMN. DROP COLUMN, ALTER COLUMN, and ADD CONSTRAINT are not supported.

4

Trigger support

It supports FOR EACH ROW triggers but does not support FOR EACH STATEMENT triggers.

5

VIEWs

Views in SQLite are read-only. You may not be able to execute DELETE, INSERT, or UPDATE statements on views.

6

GRANT and REVOKE

The only applicable access permissions are the ordinary file access permissions of the basic operating system.

SQLite commands

Standard SQLite commands for interacting with relational databases are similar to SQL. They are CREATE, SELECT, INSERT, UPDATE, DELETE, and DROP. These commands can be divided into several categories based on their operational nature.-

DDL-Data Definition Language

Serial NumberCommands and Descriptions
1

CREATE

Create new tables, table views, or other objects in the database.

2

ALTER

Modify existing database objects, such as tables.

3

DROP

Delete an entire table, database table view, or other objects.

DML-Data Manipulation Language

Serial NumberCommands and Descriptions
1

INSERT

Create a Record

2

UPDATE

Modify Records

3

DELETE

Delete Records

DQL-Data Query Language

Serial NumberCommands and Descriptions
1

SELECT

Retrieve certain records from one or more tables