SQL Series

Installing PostgreSQL and Dbeaver

A Tutorial

--

Photo by Max Duzij on Unsplash

It is first time for me to use PostgreSQL. Let me share how to employ this software through Dbeaver for all the beginners like me. Here it is.

Go to https://www.postgresql.org/download/. Select the suitable installer and download it.

Select the suitable installer
Then, run the installer and follow the instruction. When it needs password, just put it randomly.

Also, install the Dbeaver through https://dbeaver.io/download/. Follow the instruction to install it.

I select the community edition 7.0.2

For exercise, we will download the sample database named dvdrental in link https://www.postgresqltutorial.com/postgresql-sample-database/. Then, extract it as winrar/tar type. Notice the path we save this file.

We will work on database through Dbeaver that connected to Postgres. To open it up, here are the steps.

Open the SQL Shell. Copy all the words inside bracket. Then, close it.
Now we open the Command Prompt. Write cd C:\Program Files\PostgreSQL\12\bin.

Then it continues to write pg_restore -U postgres -d dvdrental c:\users\asus\downloads\dvdrental.tar and give the password when we install the Postgres.

For note, it depends on the prostgres version we have and the path of folder we put.

Now, open Dbeaver. Go to New Database Connection.
Select PostgreSQL.
Fill in the field of database according to the name and password.
We would see a folder named dvdrental in left side.
To make a new script, select SQL Editor à SQL Editor
Finally, the screen would be like this.

--

--