Case Study - SQL Lite Database

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

VISHWAKARMA INSTITUTE OF TECHNOLOGY, PUNE-

37
Department of Computer Engineering

SY. B. Tech.

CS2227: Database Management Systems

SY-CS-B2-1: HOME ASSIGNMENT

CASE STUDY

Title : SQLite
Database

Roll. No. Gr. No. Div. Name


39 12111520 B Uday Jaju
40 12111286 B Atharva Jayappa
41 12111234 B Jinay Jain
43 12111284 B Pranav Joshi

Academic Year: 2022-23 Semester: I

1
VISHWAKARMA INSTITUTE OF TECHNOLOGY, PUNE-
37
Department of Computer Engineering
Overview :

Fig No. 01

SQLite is a relational database management system contained in a C library.


In contrast to many other database management systems, SQLite is not a
client–server database engine. Rather, it is embedded into the end program.
SQLite generally follows PostgreSQL syntax. SQLite uses a dynamically and
weakly typed SQL syntax that does not guarantee the domain integrity.
This means that one can, for example, insert a string into a column defined as an
integer.

SQLite is a popular choice as embedded database software for local/client storage


in application software such as web browsers. It is arguably the most widely
deployed database engine, as it is used today by several widespread browsers,
operating systems, and embedded systems (such as mobile phones), among others.
SQLite has bindings to many programming languages.

Description :
SQLite A Brief History :
● 2000 - D. Richard Hipp designed SQLite for the purpose of
no administration required for operating a program.
● 2000 - In August, SQLite 1.0 released with GNU Database Manager.
● 2011 - Hipp announced to add UNQl interface to SQLite DB and to
develop UNQLite (Document oriented database).

2
VISHWAKARMA INSTITUTE OF TECHNOLOGY, PUNE-
37
Department of Computer Engineering

What is SQLite?
SQLite is an in-process library that implements a self-contained, serverless, zero-
configuration, transactional SQL database engine. It is a database, which is zero-
configured, which means like other databases you do not need to configure it in
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. SQLite
accesses its storage files directly.

Why SQLite?
● SQLite does not require a separate server process or system to
operate (serverless).
● SQLite comes with zero-configuration, which means no setup
or administration needed.
● A complete SQLite database is stored in a single cross-platform disk file.
● SQLite is very small and lightweight, less than 400KiB fully configured
or less than 250KiB with optional features omitted.
● SQLite is self-contained, which means no external dependencies.
● SQLite transactions are fully ACID-compliant, allowing safe access from
multiple processes or threads.
● SQLite supports most of the query language features found in
SQL92 (SQL2) standard.
● SQLite is written in ANSI-C and provides a simple and easy-to-use API.

3
VISHWAKARMA INSTITUTE OF TECHNOLOGY, PUNE-
37
Department of Computer Engineering
Features of SQLite :
SQLite has the following noticeable features: serverless, self-
contained, zero-configuration, transactional.

1] Serverless

Normally, an RDBMS such as MySQL, PostgreSQL, etc., requires a separate


server process to operate. The applications that want to access the database server
use TCP/IP protocol to send and receive requests. This is called client/server
architecture.

SQLite does NOT work this way.

SQLite does NOT require a server to run.

SQLite database is integrated with the application that accesses the database. The
applications interact with the SQLite database read and write directly from the
database files stored on disk.

The following diagram illustrates the SQLite serverless architecture:

Fig No. 02

4
VISHWAKARMA INSTITUTE OF TECHNOLOGY, PUNE-
37
Department of Computer Engineering
2] Self-Contained

SQLite is self-contained, meaning it requires minimal support from the operating


system or external library. This makes SQLite usable in any environment,
especially in embedded devices like iPhones, Android phones, game consoles,
handheld media players, etc.

SQLite is developed using ANSI-C. The source code is available as a big sqlite3.c
and its header file sqlite3.h. If you want to develop an application that uses SQLite,
you just need to drop these files into your project and compile it with your code.

3] Zero-configuration

Because of the serverless architecture, you don’t need to “install” SQLite before
using it. There is no server process that needs to be configured, started, and
stopped.

In addition, SQLite does not use any configuration files.

4] Transactional

All transactions in SQLite are fully ACID-compliant. It means all queries and
changes are Atomic, Consistent, Isolated, and Durable.

In other words, all changes within a transaction take place completely or not at all
even when an unexpected situation like application crash, power failure, or
operating system crash occurs.

5
VISHWAKARMA INSTITUTE OF TECHNOLOGY, PUNE-
37
Department of Computer Engineering

Comparing Two Popular Databases :

MySQL vs SQLite

Fig No. 03

MySQL SQLite
1] MySQL is an open source project 1] SQLite is an open source project
which is owned by Oracle. available in the public domain
2] MySQL requires a database server. 2] SQLite does not require a server to
Hence, it is client/server architecture. run. Hence, it is serverless.

3] It can handle multiple connections 3] It can handle only one connection at


simultaneously. a time.
4] It is highly scalable and can handle 4] It can handle only a small set of data
a large volume of data very efficiently. if the volume of data increases and its
performance degrades.
5] It requires large space in the 5] It requires only some KBs of space
memory for its functioning. as it is very lightweight approx.
6] MySQL supports multiple user 6] SQLite does not support multiple
environments. user environments.

6
VISHWAKARMA INSTITUTE OF TECHNOLOGY, PUNE-
37
Department of Computer Engineering

Conclusion :

SQLite is not directly comparable to client/server SQL database engines such as


MySQL, Oracle, PostgreSQL, or SQL Server since SQLite is trying to solve a
different problem.

Client/server SQL database engines strive to implement a shared repository of


enterprise data. They emphasize scalability, concurrency, centralization, and
control. SQLite strives to provide local data storage for individual applications and
devices. SQLite emphasizes economy, efficiency, reliability, independence, and
simplicity.

SQLite is a fast, reliable, and zero-configuration database. We don’t need to install


an enterprise RDBMS for every app we build, just use sqlite3 API and a database
file to get started.

References :
1] https://www.sqlitetutorial.net/sqlite-sample-database/
2] https://en.wikipedia.org/wiki/SQLite
3] https://www.sqlite.org/whentouse.html
4] https://www.sqlite.org/
5] https://www.tutorialspoint.com/sqlite/sqlite_overview.html
6]https://medium.com/swlh/5-reasons-to-use-sqlite-the-tiny-giant-for-your-next-pr
oje ct-a6bc384b2df4

You might also like