SQlite

Alireza Afzalaghaei, B.Sc Computer Science

Ahmad Asadzadeh, B.Sc Computer Science

Overview

  • What is SQlite?
  • Why use SQlite?
  • Who uses SQlite?
  • SQlite Explained
  • Difference between SQlite 2 and 3

What is SQlite?

  • It's a RDBMS
  • It's transactional
  • It's Public Domain
  • It's self-contained
  • Written in C
  • ACID-compliant

What is ACID?

  • Atomicity requires that each transaction be "all or nothing"
  • Consistency property ensures that any transaction will bring the database from one valid state to another.
  • Isolation property ensures that the concurrent execution of transactions results in a system state that would be obtained if transactions were executed sequentially
  • Durability property ensures that once a transaction has been committed, it will remain so, even in the event of power loss, crashes, or errors.

Why use SQlite?

  • Embedded SQL Database Engine
  • Serverless – accesses disk directly
  • faster than popular database engines
  • Single file
  • Cross Platform / Architecture
  • Small footprint
  • Zero configuration
  • Portable

Who uses SQlite?

  • Adobe Lightroom, AIR
  • Airbus flight software
  • Apple Mail, Safari
  • Google Chrome, Android
  • Macafee Antivirus
  • Mozilla Firefox
  • Microsoft Windows 10, Skype
  • Flame maleware

SQlite Datatypes

  • NULL
  • Integer
  • Real
  • Text
  • BLOB

SQlite Limitations

  • It is said you can’t use SQLite in production because it doesn’t support concurrency (no more than one user can be writing to the database at the same time) and it can’t scale.But many applications are used only by a few users.

 

  • For example, they are used on an intranet of a small company. Or maybe they have some hundreds of read only users, but only ten or twenty users who can write to the database.

SQlite Limitations

  • Maximum length of a string or BLOB
  • Maximum Number Of Columns
  • Maximum Length Of An SQL Statement
  • Maximum Number Of Tables In A Join
  • Maximum Depth Of An Expression Tree
  • Maximum Number Of Rows In A Table
  • Maximum Number Of Tables In A Schema
  • Maximum Database Size
  • ... 

SQlite v2

  • 64 bit Row Id
  • BLOB support
  • More concurrency
  • UTF-8 support
  • Full-text searching

SQlite v3

  • Larger file format
  • No reading while writing
  • Smaller SQL support
  • No Unicode support
Made with Slides.com