SQLite: Difference between revisions

From ALT Linux Wiki
Line 21: Line 21:
== Meta Commands ==
== Meta Commands ==


'''TODO'''
'''Meta commands''' are mainly used for administrative operations such as checking databases and specifying output formats. All of these commands are unique in that they always begin with a dot (.). Here are some of the more common ones:
 
 
{| class="wikitable"
|-
! Command !! Description
|-
| .dump || Make a copy of the database in text format
|-
| .show || Shows the current settings of the given parameters
|-
| .databases || Shows the name of databases and files
|-
| .quit || Exit
|-
| .tables || Show current tables
|-
| .schema || Table structure
|-
| .header || Display table header
|-
| .mode || Selecting the table display mode
|-
|}


== Standard Commands ==
== Standard Commands ==

Revision as of 09:33, 6 September 2022

Русский оригинал этого перевода текста.

SQLite is a local database. Nevertheless, it allows you to use the advantages and concepts of the classic SQL standard language. SQLite does not use the client-server paradigm, the software stores all data on one device. The DBMS is built into the application and works as its integral part. The database format is one file.


Installation

Before installing SQLite, it is highly recommended to upgrade your system.

You can read more about updating the system here RPM.

$ su-
# apt-get update && apt-get dist-upgrade

After we have updated the system, we can start installing the SQLite package.

# apt-get install sqlite3

Meta Commands

Meta commands are mainly used for administrative operations such as checking databases and specifying output formats. All of these commands are unique in that they always begin with a dot (.). Here are some of the more common ones:


Command Description
.dump Make a copy of the database in text format
.show Shows the current settings of the given parameters
.databases Shows the name of databases and files
.quit Exit
.tables Show current tables
.schema Table structure
.header Display table header
.mode Selecting the table display mode

Standard Commands

TODO

Creating, modifying and deleting a database

TODO

Database creation

TODO

Create tables

TODO

Delete table

TODO


ALT Linux OS packages

  • sqlite3 - CLI utility that allow you to create and work with SQLite datafiles from the command line
  • sqlite3-doc - API documentation
  • Bindings:
  1. sqlite3-tcl - TCL. By the way, TCL & SQLite has one author. SQLite was part of TCL before it became indepedent project.
  2. perl-DBD-SQLite - DBI/DBD driver for the Perl programming language
  3. python3-modules-sqlite3 - Pyhton 3 modules
  4. libsqlite3-devel - classical C & object oriented C++ headers

Sources

  1. English
  2. Russian