SQLite and DB Browser for SQLite
Installation
Chinook Database
Open the Database in DB Browser
First SQL Queries
SQLite is a lightweight relational database management system. Unlike many database systems, SQLite does not require a separate database server. A complete database can be stored in a single file, such as:
This makes SQLite useful for:
DB Browser for SQLite is a free, open-source graphical application for working with SQLite database files.
Use it to:
Download DB Browser for SQLite
After installation, launch DB Browser for SQLite as a separate application.
Installation
Chinook Database
Open the Database in DB Browser
First SQL Queries
For examples in this course, we will use the Chinook sample database.
Chinook represents a digital media store and contains related tables for:
Download the SQLite version of the Chinook database from the project releases:
The SQLite database file is named similar to:
Installation
Chinook Database
Open the Database in DB Browser
First SQL Queries
In DB Browser for SQLite:
chinook.sqlite.Customer, Album, and Track.DB Browser opens the database file directly, so you do not need to create or save a connection profile.
Use the main tabs in DB Browser:
To inspect customer records without writing a query, open Browse Data and select Customer from the Table menu.
Use Open SQL file when you want to continue working with a saved script.
A SQL statement usually ends with a semicolon:
Installation
Chinook Database
Open the Database in DB Browser
First SQL Queries
The SELECT statement retrieves data from a database table.
* means to return all columns.
Usually, we only select the columns needed for an analysis.
This makes the query output easier to read and reduces unnecessary data retrieval.
Use LIMIT when you only want to inspect a small number of rows.