How To Install Sqlite Browser In Ubuntu
How to Install SQLite and SQLite Browser on Ubuntu 20.04
Sqlite is a lightweight but feature-rich database direction organization that is widely used in embedded systems like mobile devices. It is basically a relative database direction organization used for storing structured data in large tables. Other Major Database Management Systems in this series include Microsoft's SQL Server, MySQL, PostgreSQL, IBM's DB2, and Oracle Database. Being open up-source, SQLite source code can be modified as per the requirement of developers. It is also bachelor for costless use in both commercial and non-commercial projects.
SQLite runs without the need for a separate server process. Since no server is required for setting up SQLite, an SQLite database instance can be created just similar opening a file. It is a C library that has direct access to its stored files. The whole database system is contained in a unmarried library. It is integrated directly into the host plan. It is fully compliant with Acid. It uses minimum system resources.
With the SQLite browser, nosotros can directly manipulate the files in the SQLite database. It is open up source. DB Browser is an example of an SQLite browser. It tin can be used for creating and editing database files. With the visual interface of a DB browser, you practice not need to remember SQL commands. This characteristic makes it more than flexible for new users as well as for developers.
In this guide, we will see how to install SQLite and SQLite Browser on an Ubuntu 20.04 system. There are two ways to install SQLite browser. In the first method, nosotros volition apply the Ubuntu default repository. In the 2d method, we will use Snap'southward pre-packaged application. Permit us move on to the installation process.
Prerequisites
- Bones knowledge of running commands on Linux last.
- A user business relationship with administrative ('sudo') access.
- Access to the cyberspace for fetching diverse files.
Installing SQLite from the Ubuntu 20.04 Official Repository
Step one. Before proceeding to install SQLite, update the repository listing with the below command:
sudo apt update
Step two. At present we can continue to install SQLite using the command:
sudo apt install sqlite3
In one case the SQLite is installed, y'all tin can check the installed version by:
sqlite --version
Installing SQLite Browser on Ubuntu 20.04 from official repository
Footstep 1. To install SQLite browser, employ the command:
sudo apt install sqlitebrowser
Footstep 2. Now launch the SQLite browser from the command line using:
$ sqlitebrowser
Or use the outset menu and search for SQLite browser equally shown here:
Installing SQLite Browser from the Snap Shop
Pace 1. On the Ubuntu system(>16.04), Snap comes pre-installed. In case you have a minimal installation of Ubuntu, yous can install Snap from the snapd parcel equally here:
sudo apt install snapd
If snapd is already installed, the above command will upgrade information technology if a new version is available.
Pace 2. For updating the Snap'due south path, either log out and log in once again or restart your calculator.
Stride three. At present afterwards the Step ii, open a new terminal and install SQLite from Snap :
sudo snap install sqlitebrowser
The SQLite browser or DB browser has controls and wizards for various operations such as creating database and tables, importing and exporting tables from and to CSV files, executing SQL queries, and so on.
Using The SQLite Command Line Interface
Let us create a database in SQLite and populate it with some data. To create a database named every bit 'spare', run the command:
sqlite3 spare.db
Hither 'spare 'is the proper noun of the database. The terminal prompt will now modify to the SQLite beat as:
sqlite>
Using the .aid command on the sqlite3 prompt we can listing all the SQLite commands:
To create a table for storing data, we demand to specify its name and column in the create table statement. Basic syntax for creating a table is:
CREATE TABLE [IF NOT EXISTS] [database_name].table_name( col_1 datatype Primary KEY(ane or more columns), col_2 datatype, col_3 datatype, ... ... ... );
Using the above syntax, we have created the below table named as 'parts':
CREATE Tabular array parts ( part_id INTEGER Master Cardinal, part_name TEXT Not Nada,brand_name TEXT NOT Nada UNIQUE );
The part_id field is the primary key of the parts table. The UNIQUE constraint is used to specify a unique field in the tabular array.
To insert information into this table, we need the INSERT INTO argument. The syntax for the INSERT query is :
INSERT INTO TABLE_NAME (col_1, col_2, col_3,...col_N) VALUES (val_1, val_2, val_3,...val_N);
Let's insert some data in our 'parts' table:
INSERT INTO parts (part_id,part_name,brand_name) VALUES (111, 'screw', 'thunder');
To cheque if the information is properly inserted, nosotros will utilise the SELECT query to brandish it on the concluding. The syntax for SELECT query is:
SELECT col_1, col_2, . . . . col_N FROM table_name;
In our case the SELECT query volition be:
SELECT part_id,part_name,brand_name from parts;
If you want to exit the sqlite3 prompt, only enter the .quit control.
Conclusion
That'southward all. In this guide, we take learned to install SQLite on Ubuntu twenty.04 OS. SQLite is a lightweight and fast database awarding. Attempt to build a mobile awarding using different databases and compare their performance with SQLite.
Suggested articles
0 Annotate(s)
This feature is only bachelor to subscribers. Become your subscription here.
Source: https://www.howtoforge.com/how-to-install-sqlite-and-sqlite-browser-on-ubuntu-2004/
Posted by: gonzalesmoseng.blogspot.com
0 Response to "How To Install Sqlite Browser In Ubuntu"
Post a Comment