Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Introduction to SQLite


May 16, 2021 SQLite


Table of contents


Introduction to SQLite

This tutorial helps you understand what SQLite is, the difference between it and SQL, why it is needed, and how its application database is handled.

SQLite is a software library that enables a self-sufficient, serverless, zero-configuration, transactional SQL database engine. S QLite is one of the fastest growing database engines, which is growing in popularity, independent of its size. The SQLite source code is not subject to copyright restrictions.

What is SQLite?

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

Like other databases, the SQLite engine is not a stand-alone process and can be connected statically or dynamically according to application requirements. SQLite has direct access to its storage files.

Why use SQLite?

  • A separate server process or operating system (serverless) is not required.

  • SQLite does not require configuration, which means that installation or management is not required.

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

  • The SQLite is very small, lightweight, less than 400 KiB when fully configured, and less than 250 KiB when omitting optional feature configurations.

  • SQLite is self-sufficient, which means that no external dependencies are required.

  • SQLite transactions are fully ACID-compatible and allow safe access from multiple processes or threads.

  • SQLite supports the functionality of most query languages for the SQL92 (SQL2) standard.

  • SQLite was written using ANSI-C and provides a simple and easy-to-use API.

  • SQLite runs in UNIX (Linux, Mac OS-X, Android, iOS) and Windows (Win32, WinCE, WinRT).

History

  1. 2000 -- D. Richard Hipp designed SQLite to operate programs without management.

  2. 2000 -- In August, SQLite 1.0 released GNU Database Manager.

  3. 2011 -- Hipp announces the addition of the UNQl interface to SQLite DB to develop UNQLite (document-oriented database).

SQLite limitations

In SQLite, features that SQL92 does not support are as follows:

characteristic describe
RIGHT OUTER JOIN Only Left Outer Join.
FULL OUTER JOIN Only Left Outer Join.
ALTER TABLE Support for Rename Table and ALTER TABLE, DROP Column, Alter Column, Add Constraint is not supported by DROP Column, ALTER Column.
Trigger support Support for Each ROW trigger, but does not support for Each Statement triggers.
VIEWs In SQLITE, the view is read-only.You cannot execute the delete, insert or update statement on the view.
Grant and Revoke The only access allowable access to the underlying operating system is accessible.

SQLite command

The standard SQLite command for interacting with a relationship database is similar to SQL. C ommands include CREATE, SELECT, INSERT, UPDATE, DELETE, and DROP. These commands can be divided into the following based on their operational nature:

DDL - Data definition language

Order describe
CREATE Create a new table, a watch view, or other objects in the database.
ALTER Modify some of the existing database objects in the database, such as a table.
DROP Delete the entire table, or the view, or other objects in the database.

DML - Data operation language

Order describe
INSERT Create a record.
UPDATE Modify the record.
DELETE Delete Record.

DQL - Data query language

Order describe
SELECT Some records are retrieved from one or more tables.