What is a Local Database?
A database is piece of software. It can run on someone else's computer (in the "cloud", which is exactly what we do with Amazon Web Services), or you can install and run database software on your own computer. Many times this is referred to as running a database on your localhost.
There's more than one way to get up and running with a local PostgreSQL database. The two main options are:
- Download and install a database management app (Recommended, as it's really easy and fast to setup)
- Download and install PostgreSQL directly to your computer
Either way, with the database software installed you can then store data in the database, and use a SQL client to connect to the database and start writing SQL.
Option #1 - Using a Database Management App: DBngin
If you're using an Apple computer, we have good news. TablePlus also has a free all-in-one database version management tool called DBngin, which is the easiest way to get started with running a local PostgreSQL database. They've even created a step-by-step tutorial: Getting started with PostgreSQL database on Mac.
Option #2 - Download and install PostgreSQL directly to your computer
The second option is to download the binaries from PostgreSQL’s official website. Once you have PostgreSQL installed, you'll want to use a SQL Client (e.g. TablePlus) to connect to the database software.