SQL: Create a Postgres database

Postgres is an awesome database management system.

NOTE: i will call PostgreSQL as “Postgres” most of the time, it’s the same thing).

To use it, you have 2 options.

The first one is to install Postgres locally.

The second is to use a cloud service that provides you a Postgres database.

Installing local is much more flexible.

But when you have to put your website “out there”, you’ll need a cloud database. So you have to learn both.

Let’s start local here.

Each operating system has its own way.

I’ll show you the easy way on macOS.

You can Google or YouTube “how to install postgres on <your operating system” and you’ll find a ton of different instructions.

On macOS, you can use DBngin, a very cool little app that provides a simple interface to start a Postgres database.

It’s free, download it from https://dbngin.com.

Once you have the database you click the arrow icon on the right, and it connects TablePlus to that database.

Really easy!

Now click the “SQL” icon and you’re ready to start executing SQL instructions, so you can test all the things you’ll learn very easily:

Lessons in this unit:

0: Introduction
1: Using TablePlus
2: ▶︎ Create a Postgres database
3: Create a new table
4: Add data to a table
5: Query data with SELECT
6: Delete data from the database
7: Update data with UPDATE
8: Null constraints
9: Unique and primary keys
10: Updating a table structure
11: Joins
Want to learn more? Check out our courses