CONNECT TO EXISTING DATABASE
A database and user named postgres are automatically created when Postgresql is installed on your computer.
The default database, postgres, is used to establish a connection to the database before you build a new one. Open a new SQL script editor once the connection has been established in Dbeaver, as seen in the figure below.
CREATE NEW DATABASE USING DBEAVER GUI
As seen in the image below, select “Create New Database” from the context menu when you right-click on the Databases option under “Database Navigator” on the left side of the screen. A pop-up will display after you select the “Create New Database” option; in that pop-up, type the name of the Database you wish to create and click “Ok,” as shown in the image below.
CREATE NEW DATABASE USING SQL COMMAND
As shown in the figure below, the sql command “Create Database” can also be used to create new databases.
-- Syntax CREATE DATABASE DATABASE_NAME; -- Example CREATE DATABASE sample;