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

SQLite engine is not a standalone process like other databases, you can link it statically or dynamically as per your requirement with your application. The SQLite accesses its storage files directly.

The database that can be used by apps in iOS (and also used by iOS) is called SQLite, and it’s a relational database. It is contained in a C-library that is embedded to the app that is about to use it. Note that it does not consist of a separate service or daemon running in the background and attached to the app.

SQLite is not as powerful as other DMBSs, such as MySQL or SQL Server, as it does not include all of their features. However, its greatness lies mostly to these factors:

  • It’s lightweight.
  • It contains an embedded SQL engine, so almost all of your SQL knowledge can be applied.
  • It works as part of the app itself, and it doesn’t require extra active services.
  • It’s very reliable.
  • It’s fast.
  • It’s fully supported by Apple, as it’s used in both iOS and Mac OS.
  • It has continuous support by developers in the whole world and new features are always added to it.

SQLite Limitations:

There are few unsupported features of SQL92 in SQLite which are shown below:

ALTER TABLEThe RENAME TABLE and ADD COLUMN variants of the ALTER TABLE command are supported. The DROP COLUMN, ALTER COLUMN, ADD CONSTRAINT not supported.
Trigger supportFOR EACH ROW triggers is supported but not FOR EACH STATEMENT triggers.
VIEWsin SQLite are read-only. You may not execute a DELETE, INSERT, or UPDATE statement on a view.
GRANT and REVOKEThe only access permissions that can be applied are the normal file access permissions of the underlying operating system.

SQLite Commands:

The standard SQLite commands to interact with relational databases are similar to SQL. They are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP. These commands can be classified into groups based on their operational nature:

DDL - Data Definition Language:
CREATECreates a new table, a view of a table, or other objects in database
ALTERModifies an existing database object, such as a table.
DROPDeletes an entire table, a view of a table or other object in the database.

DML - Data Manipulation Language:
INSERTCreates a record
UPDATEModifies records
DELETEDeletes records

DQL - Data Query Language:
SELECTRetrieves certain records from one or more tables

Next : we will learn about iOS : SQLite Database is a Software Library

  Modified On Feb-27-2018 01:24:44 AM

Leave Comment