DEV Community

Kulogun Samuel
Kulogun Samuel

Posted on

STARTING WITH POSTGRESQL AND VALENTINA STUDIO THROUGH CLI

POSTGRESQL is a Database Managing System DBMS while VALENTINA is a multi data-management-tool.

After complete and proper installation of PostgreSQL on https://www.postgresql.org/download/ and valentina Studio on https://www.valentina-db.com/en/all-downloads/current, I have a database to work on.
A picture of my available database
Extracting the zip file into a folder you have the following files:
Content of the extracted folder right here
Next, databases are created for each file to work on Valentino Studio. First I create an Employee database for the employees SQL source file in the extracted folder. This is done by clicking "create database" on valentina and titling it accordingly, in my case "Employee".
A view of the "create database" on valentina
Click on create
the pop up page for create
Next is to upload our 'employees' sql source present in our extracted database file to the created 'Employee' database on our valentina studio through the Command Line Interface CLI. You can easily reach your command line on windows pressing 'cmd' on your search. This is highlighted below:
Step1: Locate the directory of the sql source file in my case 'employee' from the extracted folder. Copy the directory,
View of my directory being copied

go to the CLI and press 'cd' meaning 'changing directory' then paste the copied directory,
Changing directory of my command line
tap enter and you have this:
View of my command line in the employee folder
Step2: Locate your 'psql' file in your program files on your 'pgAdmin4' folder and copy the directory
View of my directory being copied
add psql.exe while having all the code in quote
Image description
'add -U postgres -d Employee<employees.sql' to upload the employees.sql to the pgAdmin4 and the -d to upload to the database on valentina. You have something of this nature:
View of how the code
tap enter and it demands for your postgres password
Inputting your password
You input your password and schema is created in the Employee folder in your database. A Schema is what contains tables and the details in your valentino.

We can now return to our valentina click on the public to see the tables present in our uploaded database.
Schema in our valentina studio showing us the tables

To query your database, you click on the sql employee beside the Schema editor and the codes can be executed.
Using the Schema editor for query

Discussion (1)

Collapse
andrewbaisden profile image
Andrew Baisden

Nice! It was Andrei Neagoie's course on Udemy that got me into that tech stack.