Database Creation in DB level

In PostgreSQL, creating a database requires multiple stages. SQL commands or graphical tools like pgAdmin can be used for this.

Connect to PostgreSQL :
First, connect to your PostgreSQL server using a client application or command-line tool like ‘psql’.
    psql -U username -d postgres

Create Database :
Once connected, you can create a new database using the ‘CREATE DATABASE’ SQL command.
    CREATE DATABASE dbname;

Grant Privileges : Optionally, you can grant privileges to specific users on the newly created database. For example, to grant all privileges to a user named ‘user1’.
Exit:
Once you've created the database and granted privileges, if necessary, you can exit the PostgreSQL prompt. (Type \q)


(Database creation from bash)