- Как установить SQLite и браузер SQLite в Ubuntu
- Установка SQLite в Ubuntu
- Создание базы данных и таблицы SQLite
- Установка браузера SQLite в Ubuntu
- Удаление SQLite и браузера SQLite
- Downloads
- Windows
- Windows PortableApp
- macOS
- Homebrew
- Nightly builds
- Linux
- AppImage
- Snap packages
- Snap Release build
- Snap Nightly builds
- Arch Linux
- Fedora
- openSUSE
- Debian
- Ubuntu and Derivatives
- Stable release
- Nightly builds
- Other Linux
- FreeBSD
- DB Browser for SQLite
- Screenshot
- What it is
- What it is not
- DB Browser for SQLite
- The Official home of the DB Browser for SQLite
- Screenshot
- What it is
- What it is not
- Nightly builds
- Windows
- MacOS X / macOS
- Linux
- Arch Linux
- Fedora
- Debian
- Ubuntu and Derivatives
- Stable release
- Nightly builds
- Other Linux
- FreeBSD
- Developer mailing list
- Website
- Old project pages
- Releases
- History
- License
Как установить SQLite и браузер SQLite в Ubuntu
SQLite — это легкая, небольшая и автономная СУБД. Популярные базы данных, такие как MySql, PostgreSQL и т. д. работают как клиент — сервер, и у них есть специальный процесс, выполняющий и контролирующий все аспекты работы базы данных.
А SQLite не имеет запущенного процесса и не имеет модели клиент — серверной. SQLite DB — это просто файл с расширениями .sqlite3 .sqlite .db. Каждый язык программирования имеет библиотеку для поддержки SQLite.
SQLite используется в таких программах как:
- Веб-браузеры (Chrome, Safari, Firefox).
- MP3-плееры, приставки и электронные гаджеты.
- Устройства на Android, Mac, Windows, iOS и iPhone.
Областей где используется SQLite очень много. Например каждый смартфон в мире имеет сотни файлов базы данных SQLite. На наш взгляд это довольно большое количество. Пока приступить к установке db.
Установка SQLite в Ubuntu
Настройка и установка SQLite очень проста, по сравнению с другими популярными базами данных, такими как MySql, Postgresql и т. д. Во-первых, обновите apt-cache, выполнив следующую команду.
Теперь проверьте, есть ли какие нибудь пакеты SQLite, которые доступны в репозитории apt. Для этого выполнив следующую команду.
Чтобы установить SQLite, выполните следующую команду.
Вы можете проверить установку, для этого запустите сеанс sqlite. Это можно сделать выполнив следующую команду.
Как видно из приведенного выше изображения, SQLite3 успешно установлен и работает с версией 3.33.0..
Создание базы данных и таблицы SQLite
База данных хранится в виде файла в вашей файловой системе. Вы можете создать базу данных при запуске сеанса sqlite, указав имя базы данных в качестве аргумента. Если БД доступна, она откроет базу данных, если нет, то создаст новую базу данных.
Если мы не передаем имя БД в качестве аргумента, то создается временная база данных в памяти, которая будет удалена после завершения сеанса. Здесь у меня нет никакой базы данных, поэтому я создам новую БД, упомянув имя db в качестве аргумента. Как только вы подключитесь к сеансу, вы можете запустить команду .databases, чтобы увидеть, какой файл прикреплен к базе данных.
$ sqlite3 /home/tecmint/test # создание тестовой базы данных в /home/tecmint
sqlite> .databases #команда для того чтобы увидеть, какой сеанс базы данных подключен
Теперь давайте создадим пример таблицы, выполнив следующие запросы.
# create table
sqlite> CREATE TABLE employee(
Name String,
age Int);
# Insert records
sqlite> insert into employee(Name, age)
VALUES (‘Tom’,25),
(‘Mark’,40),
(‘Steve’,35);
Вы можете запустить команду .tables, чтобы вывести список таблиц в базе данных.
sqlite> .tables # отображает список таблиц в базе данных
sqlite> .headers on # включить столбец для печати
sqlite> SELECT * FROM employee; # выбор записи из таблицы
Установка браузера SQLite в Ubuntu
Теперь, когда мы как установили и настроили sqlite3, мы также установим sqlite browser. Это простой графический инструмент для управления базами данных sqlite.
$ sudo apt install sqlitebrowser -y
Вы можете запустить приложение из меню «Пуск» или из терминала. Для запуска браузера из терминала выполните следующую команду.
Удаление SQLite и браузера SQLite
Для удаления SQLite, так и SQLite browser потребуется выполнить следующую команду.
$ sudo apt —purge remove sqlite3 sqlitebrowser
Вот и все. Если у вас есть какие-либо отзывы или советы, пожалуйста, используйте раздел комментариев, чтобы опубликовать их.
Источник
Downloads
Windows
Our latest release (3.12.2) for Windows:
Windows PortableApp
Note — If for any reason the standard Windows release does not work (e.g. gives an error), try a nightly build (below).
Nightly builds often fix bugs reported after the last release. рџ„
macOS
Our latest release (3.12.2) for macOS:
Homebrew
If you prefer using Homebrew for macOS, our latest release can be installed via Homebrew Cask:
Nightly builds
Download nightly builds for Windows and macOS here:
Linux
Our latest release is available as an AppImage, Snap packages, and distribution specific packages:
AppImage
Remember to change it’s permission bits to be executable before you run it. рџ„
Snap packages
Snap Release build
Snap Nightly builds
Other distribution specific instructions:
Arch Linux
Arch Linux provides an up to date version
Install with the following command:
Fedora
Install for Fedora (i386 and x86_64) by issuing the following command:
openSUSE
Debian
Note that Debian focuses more on stability rather than newest features. Therefore packages will typically contain some older version, compared to the latest release.
Update the cache using:
Install the package using:
Ubuntu and Derivatives
Stable release
For Ubuntu and derivaties, @deepsidhu1313 provides a PPA with the latest release here:
To add this ppa just type in these commands in terminal:
Then update the cache using:
Install the package using:
Ubuntu 14.04.X, 15.04.X, 15.10.X and 16.04.X are supported for now (until Launchpad decides to discontinue building for any series).
Ubuntu Precise (12.04) and Utopic (14.10) are not supported:
- Precise does not have a new enough Qt package in its repository by default, which is a dependency
- Launchpad does not support Utopic any more, which has reached its End of Life
Nightly builds
Nightly builds are available here:
To add this ppa, type these commands into the terminal:
Then update the cache using:
Install the package using:
Other Linux
On others, compile DB4S using the instructions in BUILDING.md.
FreeBSD
DB Browser for SQLite works well on FreeBSD, and there is a port for it (thanks to lbartoletti рџ„). DB4S can be installed using either this command:
Источник
DB Browser for SQLite
The Official home of the DB Browser for SQLite
Screenshot
What it is
DB Browser for SQLite (DB4S) is a high quality, visual, open source tool to create, design, and edit database files compatible with SQLite.
DB4S is for users and developers who want to create, search, and edit databases. DB4S uses a familiar spreadsheet-like interface, and complicated SQL commands do not have to be learned.
Controls and wizards are available for users to:
- Create and compact database files
- Create, define, modify and delete tables
- Create, define, and delete indexes
- Browse, edit, add, and delete records
- Search records
- Import and export records as text
- Import and export tables from/to CSV files
- Import and export databases from/to SQL dump files
- Issue SQL queries and inspect the results
- Examine a log of all SQL commands issued by the application
- Plot simple graphs based on table or query data
What it is not
This program is not a visual shell for the sqlite command line tool, and does not require familiarity with SQL commands. It is a tool to be used by both developers and end users, and must remain as simple to use as possible in order to achieve these goals.
Источник
DB Browser for SQLite
The Official home of the DB Browser for SQLite
2017-09-28 — Added PortableApp version of 3.10.1. Thanks John. 🙂
2017-09-20 — DB Browser for SQLite 3.10.1 has been released! 😀
2017-09-08 — Removed the continuous AppImage builds for Linux due to problems with the upload script.
Screenshot
What it is
DB Browser for SQLite is a high quality, visual, open source tool to create, design, and edit database files compatible with SQLite.
It is for users and developers wanting to create databases, search, and edit data. It uses a familiar spreadsheet-like interface, and you don’t need to learn complicated SQL commands.
Controls and wizards are available for users to:
- Create and compact database files
- Create, define, modify and delete tables
- Create, define and delete indexes
- Browse, edit, add and delete records
- Search records
- Import and export records as text
- Import and export tables from/to CSV files
- Import and export databases from/to SQL dump files
- Issue SQL queries and inspect the results
- Examine a log of all SQL commands issued by the application
What it is not
This program is not a visual shell for the sqlite command line tool. It does not require familiarity with SQL commands. It is a tool to be used both by developers and by end users, and it must remain as simple to use as possible in order to achieve its goals.
Nightly builds
Nightly builds for Windows and OSX can be downloaded here:
Windows
Windows releases can be downloaded here:
Note — If for some reason the standard Windows release doesn’t work for you (eg it gives an error), try a nightly build. They often fix bugs reported after the last release. 😀
MacOS X / macOS
DB Browser for SQLite works well on MacOS X / macOS.
- OSX 10.8 (Mountain Lion) — 10.13 (High Sierra) are tested and known to work
OSX releases can be downloaded here:
brew cask install db-browser-for-sqlite
Linux
DB Browser for SQLite works well on Linux.
Arch Linux
Arch Linux provides a package through pacman.
Fedora
For Fedora (i386 and x86_64) you can install by issuing:
$ sudo dnf install sqlitebrowser
Debian
Note that Debian focuses more on stability rather than newest features. Therefore packages will typically contain some older (but well tested) version, compared to the latest release.
Update the cache using:
sudo apt-get update
Install the package using:
sudo apt-get install sqlitebrowser
Ubuntu and Derivatives
Stable release
For Ubuntu and derivaties, @deepsidhu1313 provides a PPA with our latest release here:
To add this ppa just type in these commands in terminal:
sudo add-apt-repository -y ppa:linuxgndu/sqlitebrowser
Then update the cache using:
sudo apt-get update
Install the package using:
sudo apt-get install sqlitebrowser
Ubuntu 14.04.X, 15.04.X, 15.10.X and 16.04.X are supported for now (until Launchpad decides to discontinue building for any series).
Ubuntu Precise (12.04) and Utopic (14.10) are not supported:
- Precise doesn’t have a new enough Qt package in its repository by default, which is a dependency
- Launchpad doesn’t support Utopic any more, as that has reached its End of Life
Nightly builds
Nightly builds are available here:
To add this ppa just type in these commands in terminal:
sudo add-apt-repository -y ppa:linuxgndu/sqlitebrowser-testing
Then update the cache using:
sudo apt-get update
Install the package using:
sudo apt-get install sqlitebrowser
Other Linux
On others you’ll need to compile it yourself using the (simple) instructions in BUILDING.md.
FreeBSD
DB Browser for SQLite works well on FreeBSD, and there is a port for it (thanks to lbartoletti). It can be installed using either this:
# make -C /usr/ports/databases/sqlitebrowser install
# pkg install sqlitebrowser
Developer mailing list
Website
Old project pages
Releases
- Version 3.10.1 released — 2017-09-20
- Version 3.10.0 released — 2017-08-20
- Version 3.9.1 released — 2016-10-03
- Version 3.9.0 released — 2016-08-24
- Version 3.8.0 released — 2015-12-25
- Version 3.7.0 released — 2015-06-14
- Version 3.6.0 released — 2015-04-27
- Version 3.5.1 released — 2015-02-08
- Version 3.5.0 released — 2015-01-31
- Version 3.4.0 released — 2014-10-29
- Version 3.3.1 released — 2014-08-31 — Project renamed from «SQLite Database Browser»
- Version 3.3.0 released — 2014-08-24
- Version 3.2.0 released — 2014-07-06
- Version 3.1.0 released — 2014-05-17
- Version 3.0.3 released — 2014-04-28
- Version 3.0.2 released — 2014-02-12
- Version 3.0.1 released — 2013-12-02
- Version 3.0 released — 2013-09-15
- Version 3.0rc1 released — 2013-09-09 — Project now on GitHub
- Version 2.0b1 released — 2009-12-10 — Based on Qt4.6
- Version 1.2 released — 2005-04-05
- Version 1.1 released — 2004-07-20
- Version 1.01 released — 2003-10-02
- Version 1.0 released to public domain — 2003-08-19
History
This program was developed originally by Mauricio Piacentini (@piacentini) from Tabuleiro Producoes, as the Arca Database Browser. The original version was used as a free companion tool to the Arca Database Xtra, a commercial product that embeds SQLite databases with some additional extensions to handle compressed and binary data.
The original code was trimmed and adjusted to be compatible with standard SQLite 2.x databases. The resulting program was renamed SQLite Database Browser, and released into the Public Domain by Mauricio. Icons were contributed by Raquel Ravanini, also from Tabuleiro. Jens Miltner (@jmiltner) contributed the code to support SQLite 3.x databases for the 1.2 release.
Pete Morgan (@daffodil) created an initial project on GitHub with the code in 2012, where several contributors fixed and improved pieces over the years. René Peinthor (@rp-) and Martin Kleusberg (@MKleusberg) then became involved, and have been the main driving force from that point. Justin Clift (@justinclift) helps out with testing on OSX, and started the new github.com/sqlitebrowser organisation on GitHub.
John T. Haller, of PortableApps.com fame, created the new logo. He based it on the Tango icon set (public domain).
In August 2014, the project was renamed to «Database Browser for SQLite» at the request of Richard Hipp (creator of SQLite), as the previous name was creating unintended support issues.
In September 2014, the project was renamed to «DB Browser for SQLite», to avoid confusion with an existing application called «Database Browser».
License
DB Browser for SQLite is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later.
You can modify or redistribute it under the conditions of these licenses.
This page was generated by GitHub Pages using the Architect theme by Jason Long.
Источник