Just a few weeks until the 2021 JavaScript Full-Stack Bootcamp opens.
Signup to the waiting list!
I’m a Mac user and I do not own a Windows computer, so I can’t write the instructions for Windows. Google “how to install sqlite on windows” for specific instructions. Same goes for Linux.
On macOS, you don’t need to do anything to install sqlite. It’s preinstalled in all modern versions of macOS.
All you need to do is to open a terminal and run the
sqlite3
command.
Press ctrl-C 2 times to exit the SQLite executable.
This is pretty cool!
My macOS with Mojave comes with SQLite 3.24, and the latest version (at the time of writing) is SQLite 3.30. You can upgrade SQLite using Homebrew, but for the sake of simplicity, I’m not going to cover this.
A great software we can use to interact with a SQLite database is TablePlus. It comes with a free trial that’s perfect for our usage, because it’s not time-based but rather it limits the amount of concurrent connections you can make to the database.
Download it from https://tableplus.com. I know there are macOS, Windows and Linux versions.
You create a new connection, choosing SQLite:
You select a name, and type a database path. I choose test.db
, in the /Users/flaviocopes/
folder:
SQLite is pretty cool because the database is contained in a file, which you can put pretty much everywhere you want. This is radically different from PostgreSQL, and MySQL and other big DBMS.
Pressing Connect
, the connection was successfully created:
and I can see the file created in that folder, with zero KB of size:
That’s it.
I’m going to make more tutorials on how to use this SQLite database, soon.
The 2021 JavaScript Full-Stack Bootcamp will start at the end of March 2021. Don't miss this opportunity, signup to the waiting list!
More database tutorials:
- The MongoDB basics tutorial
- How MongoDB is different from a SQL database
- Information systems, data and information
- Data models
- Introduction to the ER Data Model
- The Relational Model
- Relational Algebra
- Relational Databases
- What is a Database? And a DBMS?
- Introduction to SQL
- How to install PostgreSQL on macOS
- Do you always need a database for your app?
- How to install SQLite on macOS
- Introduction to PostgreSQL
- PostgreSQL User Permissions
- How to list all users in PostgreSQL
- How to switch database using PostgreSQL
- How to list all databases using PostgreSQL
- How to list tables in the current database using PostgreSQL
- How to install MySQL on macOS
- Creating a user on MySQL
- PostgreSQL vs MySQL, a comparison
- SQLite User Permissions
- MySQL User Permissions
- SQL, creating a table
- SQL, adding data to a table
- SQL, how to use SELECT
- SQL, Handling empty cells
- SQL, Unique and Primary keys
- SQL, how to update data
- SQL, how to update a table structure
- SQL, how to delete data and tables
- SQL Joins
- SQL Views
- How to insert multiple items at once in a MongoDB collection
- How to remove all items from a MongoDB collection