sqlite |
Introduction
Tutorial SQLite Create Database. SQLite is a relational database management system that is ACID-compliant and has a size relatively small code library, written in C.
What is SQLite?
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 database 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. The 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 light weight, 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 the SQL92 (SQL2) standard.
- SQLite is written in ANSI-C and provides simple and easy-to-use API.
- SQLite is available on UNIX (Linux, Mac OS-X, Android, iOS) and Windows (Win32, WinCE, WinRT).
Download SQLite
In this tutorial in windows.
sqlite windows download |
Download two file in here.
Use your command prompt line to access your sqlite.exe.
For a listing of the available dot commands, you can enter ".help" at any time. For example:
sqlite>.help
Command | Description |
---|---|
.backup ?DB? FILE | Backup DB (default "main") to FILE |
.bail ON|OFF | Stop after hitting an error. Default OFF |
.databases | List names and files of attached databases |
.dump ?TABLE? | Dump the database in an SQL text format. If TABLE specified, only dump tables matching LIKE pattern TABLE. |
.echo ON|OFF | Turn command echo on or off |
.exit | Exit SQLite prompt |
.explain ON|OFF | Turn output mode suitable for EXPLAIN on or off. With no args, it turns EXPLAIN on. |
.header(s) ON|OFF | Turn display of headers on or off |
.help | Show this message |
.import FILE TABLE | Import data from FILE into TABLE |
.indices ?TABLE? | Show names of all indices. If TABLE specified, only show indices for tables matching LIKE pattern TABLE. |
.load FILE ?ENTRY? | Load an extension library |
.log FILE|off | Turn logging on or off. FILE can be stderr/stdout |
.mode MODE | Set output mode where MODE is one of:
|
.nullvalue STRING | Print STRING in place of NULL values |
.output FILENAME | Send output to FILENAME |
.output stdout | Send output to the screen |
.print STRING... | Print literal STRING |
.prompt MAIN CONTINUE | Replace the standard prompts |
.quit | Exit SQLite prompt |
.read FILENAME | Execute SQL in FILENAME |
.schema ?TABLE? | Show the CREATE statements. If TABLE specified, only show tables matching LIKE pattern TABLE. |
.separator STRING | Change separator used by output mode and .import |
.show | Show the current values for various settings |
.stats ON|OFF | Turn stats on or off |
.tables ?PATTERN? | List names of tables matching a LIKE pattern |
.timeout MS | Try opening locked tables for MS milliseconds |
.width NUM NUM | Set column widths for "column" mode |
.timer ON|OFF | Turn the CPU timer measurement on or off |
SQLite Create Database
The SQLite sqlite3 command is used to create new SQLite database. You do not need to have any special privilege to create a database.
Syntax:
Basic syntax of sqlite3 command is as follows:
$sqlite3 DatabaseName.db
Always, database name should be unique within the RDBMS.
Advantages
- SQLite uses operating read / write without any intermediary server process tesendiri, of course, will make the performance offered by SQLite to be much better when compared with other databases.
- Has a serverless properties and zero configuration, it will be easier for developers to migrate from one environment to another environment. Enough with the copy and paste files and database applications is required then we will be migrated easily.
source :
http://www.tutorialspoint.com/sqlite
https://id.wikipedia.org/wiki/SQLite
No comments:
Post a Comment