TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Database

SQLite database introduction

Overview

SQLite is a small, compact, a self-contained, embedded and high reliable database. SQLite is not client-server database. Unlike other SQL databases, SQLite does not have a separate server process.

SQLite is cross platform and supports various platforms like Windows, Linux, Android etc.

Getting started

You can download it for the popular OS platforms at: https://sqlite.org/download.html

 

SQLite setup is easy. Download the file and extract the files. SQLite is server-less and requires zero configuration. For example, for Windows platform you can download the sqlite-tools and the .dll files and extract to some convenient folder. Say c:\sqlite

sqlite3 command line

The sqlite3 tool is a command line terminal based tool to interact with the SQLite database. You can launch the tool with the following command in the prompt. Open command prompt and cd to the extracted path and verify if its working as shown below:

/> sqlite3

Create database

You can use the sqlite3 command line tool to create a new database file.

$ sqlite3 myDB.db

The database is stored in a cross-platform disk file.

Create table

CREATE TABLE emp (
empno integer PRIMARY KEY,
ename text NOT NULL,
job text NOT NULL,
salary integer NOT NULL,
deptid integer NOT NULL
);

 

The .tables command displays the tables in the database.

.tables

You can run simple SQL queries to populate the table and view the data.

INSERT INTO emp VALUES(1,'John Smith','SALESMAN',2500,30);

SELECT * FROM emp;

Related Posts

Database /

MS Access Data Types

Database /

Popular NoSQL Databases

Database /

Database Characteristics

Database /

3-Tier Architecture

Database /

Entity-Relationship Model

‹ Popular NoSQL Databases› MS Access Data Types

Recent Posts

  • Scaler Academy – An Online Learning Platform
  • Difference between PHP and JavaScript?
  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com