The final piece of your setup puzzle is to get familiar with Pgadmin and administration and management
tool for PostgreSQL.
So the Pgadmin software is free, but don't underestimate its performance, right?
So it's a full featured tool as a powerful as pie tool, such as Microsoft SQL Server Management Studio.
So with Pgadmin, you get a graphical interface where you can configure multiple aspects of your Postgres
SQL Server and databases.
And most appropriately, for this course, you will use a SQL query tool for writing, running and saving
queries.
So now let's run the assuming you follow the installation steps for your operational system earlier
in this section.
So here's how you launch the Pgadmin So you can also go to start menu, find the PostgreSQL folder here.
Let's actually.
Here.
You can also go to the start menu, uh, find the PostgreSQL folder here, as you can see here.
And we have several applications here, which is one of them is Pgadmin and SQL Shell, which we will
use all of this here.
You can also use the application stack builder to download and install new extensions and so on.
So let's click on the Pgadmin here and that's it.
Now after you should see the Pgadmin splash screen followed by the application opening.
So if it's your first time launching Pgadmin, you will also receive a prompt to set a master password,
which you will see here.
Let me get my pen.
So PG admin is starting here.
Might take some time, depending on your computer's performance.
Let's start a write up.
We also have pain here, which I will draw things on the screen.
If there's a problem with starting, you know, it's starting.
Yes.
You can see there's a dialogue that you can read and see the status of our program.
The Pgadmin four is started, as you can see here.
That's it.
So that's that's the password screen that I talked about.
So the you will enter the password here.
In this case, I already set my password.
In this case.
My password is one, two, three.
And here after that click on.
Okay, you can also reset master password from here to remove all the saved passwords will remove established
connections to the server and you may need to reconnect again.
Yes.
Here and now.
This is the screen you will see.
And here I will enter my password again.
This is a new password.
And here, that's it.
This is our pgadmin.
So here on Mac on macOS, when you launch the Pgadmin the first time the dialog might appear that displays
the Pgadmin for that application can't open because it's from an unidentified developer.
So now you should have to right click on the icon and click open and the next dialog should give you
the option to open the application going forward.
Your Mac will remember your granting this permission.
So this is only applies if you are using Mac in Linux.
You will and in Windows you will open this program without any problems.
So the Pgadmin layout includes a left vertical pane here.
This is a left vertical pane here.
This is a left vertical pane.
Uh, that displays an object browser where you can find available servers here, as you can see here.
And the databases, users and other objects.
Across the top of the screen is a collection of various it's a collection of menu items and below these
are the tabs.
Here are the tabs.
That displays various aspects of database objects and performance.
So here now let's connect to our database.
So PostgreSQL is a database management system, which means it's a software that allows you to define,
manage and query databases.
So when you install PostgreSQL, it created a database server, an instance of the application running
on your computer.
So that includes a default database called.
Postgres here.
A database is a collection of objects that includes tables, functions and much more.
So this is where your actual data will lie here.
So we use the SQL language as well as Pgadmin to manage objects and data stored in the database.
So in next lectures you will create your own databases on your PostgreSQL server to organize your work.
For now, let's connect to Default Postgres database to explore pgadmin that we created.
Remember, we created this database when we started and installed some extensions and we also gave the
passwords for this and you will use that password.
In this case, my password is one, two, three here and click on okay.
And that's it.
So in the object browser, click on the downward pointing arrow to the left of the server node to show
the default server.
And depending on your operating system, the default server name could be localhost or PostgreSQL where
you and the postgres SQL X here.
In this case it's 15.
Then this is the version number.
So.
Now expand the databases and then expand the default database PostgreSQL.
Here, as you can see here, we have users table spaces, login and group roles.
And that's it.
So.
So if Pgadmin doesn't show a default under servers, you will need to add it.
Right click servers here.
Read.
And server group.
And here we will name it something.
In this case, it's my name.
Typhoon and click on Save.
Here.
As you can see at the bottom, we opened some new databases, which has nothing in it.
So.
And after that you will add a create server group, register server and so on.
So now.
The.
Let's explore the query.
Right.
So.
The application includes a query tool which where you write and execute the code.
So to open the query query tool in the object browser first, you click once on any database to highlight
it here.
This case is Postgres.
That's it.
And then you will select the tools.
And here you will also select the query tool.
So first you need to click on some database.
In this case, it's Postgres here.
That's it.
Now after clicking postgres just once.
And after that you will come to Tools and Query tool.
That's it.
So you will see.
Three panes here.
Separated by here.
One, two, three.
So this three panes.
And you can also open the multiple tabs to connect and write queries for different databases or just
organize your code the way you would like.
So to open another type tab, click on database and the object browser.
Here, as you can see, we have tab right now here we can also open this.
Tools.
We can also use the SQL tool, which you will see and we will use later.
And here, as you can see here, this works like a browser here.
We can navigate through that.
So now let's enter the code into query editor.
So here now we will.
We will download the lecture extension that I uploaded here in this lecture.
You can also find this in the Udemy downloadable section of this lecture.
Now I will come right out here.
So here we will use and let's actually use the basic statement here.
So to execute this statement, highlight the line width here, select and then click execute.
As you can see, we were successfully, successfully run and it showed us nothing.
So.
Here.
This is the play button.
Execute here.
You can also use the F5 to execute.
This is a shortcut for execution.
And yeah.
And if you write the select version like that, you will you you will see the version of our.
For SQL Server.
As you can see here, Postgres 15.2 compiled by Visual C plus plus built by 19 1464 bit.
So you will learn you will learn much more about queries later in this course.
But for now, all you need to know is that the query uses a PostgreSQL specific function called version
to retrieve the version information for the server.
In my case, the output proves that I'm running in 15.2 version and it provides additional specifics
on the build of the software.
Her here.
Now, we can also customize the which we will do later in this section.
So see you later.