Sqlite: a quick tutorial

in #technology7 years ago

Thinking of implementing a small database? I recommend SQLite. This is an embedded SQL database engine. Unlike most other SQL databases, has a low memory footprint. SQLite does not have a separate server process. It reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, can be contained in a single disk file.

sql main.JPG

Sqlite has the following features

  • Zero configuration
  • Portability
  • Compactness
  • Simplicity
  • Liberal licensing
  • Reliability
  • Flexibility
  • Selfcontained

To get you started, First go to sqlite webpage here.
Next you download the binary file for your operating system.

Next you download the binary file for your operating system.

sql download.JPG

  • Create Database

Open a command prompt from run in windows.

  1. Prompt: > sqlite3 employee.db (this creates the database called employee)
  2. Prompt: > Create table employee(empid integer, name varchar(20), title varcha(10)); (this create a table called employee)
  • Insert Data
  1. insert into employee values(101, ‘David Nunnes’, ‘CEO’); (this inserts the values into the table)
  • Confirm Data
    1 Select * from employee; (This gets the record you inserted into the employee table)

The output will display the record that was created.

In my next post I will introduce the sqlite manager.

Thanks for reading.

Sort:  

Hi, This is an amazing post, You can add resources as well which are listed here: https://hackr.io/tutorials/learn-sqlite

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.028
BTC 58434.58
ETH 2303.84
USDT 1.00
SBD 2.47