DEV Community

G30SM4RT
G30SM4RT

Posted on

Importing Database into PostgreSQL and Valentino through CMD

Starting my journey as a data analyst, the first obstacle i faced was importing the database for the learning process, and this article is the step by step documentation of how i successfully imported the database into Valentina Studio and PostgreSQL.

Before diving in, let me explain what PostgreSQl, Valentina Studio and CMD is.

Valentina Studio is a database management tool suite for working with databases including MySQL, PostgreSQL, Microsoft SQL Server, MariaDB, and SQLite. it can be used to connect to multiple databases at the same time. it is a multi-data management tool.

PostgreSQL is a database management system, it supports both relational and non-relational data types.

CMD is an accronymn for command prompt. The command prompt is a native application of the Windows operating system and gives the user an option to perform operations using commands.

Having explained what PostgreSQL, Valentina Studio and CMD are,
The first thing i did to import the database was to create a database title on Valentina studio.
Image description
In the image above, i created a database on Valentina studio with the title relating to the database i want to import.
There are 4 databases to be imported, which are;

  1. Employee
  2. France
  3. World
  4. Store

I created database titles for these databases that i want to import into Valentina studios. see image below
Image description

Next, I launched the CMD through the windows key + R and typed cmd.
on the CMD, I tried locating the location of the downloaded database file to be imported but I got an error response in return due to my not specifying the location correctly. kindly find the image below
Image description
finally, I corrected the error and I successfully located the location of the database. find image below
Image description
Next is to create a user on PostgreSQL with the postgresql.exe file using cmd and importing the database into the database title that was previously created on Valentina studios
Image description
in the image above, I encountered some errors and that was due to not typing the correct user name on postgres, which I eventually corrected and the database imported successfully.

the images below shows the Valentina studios with the empty employee database, and the one with the imported employee database after the cmd execution.

Image description
Image description
next is to import the last 3 databases which are France, World and Store, using the cmd.
Image description
Image description

Image description

Upon successful importation of the database, the created database titles created on the Valentina studio had been populated with the database. find below the images.

Image description
Image description
Image description

Having imported the database, automatically, the database gets imported to PostgreSQL too, and it can also be queried using the PgAdmin 4 software. find the below image

Image description

Top comments (0)