I will call you back again to another video lecture on PostgreSQL.
And in this lecture I'll go ahead and teach you how to create your very first database in PostgreSQL.
Now let's go ahead and kick off immediately.
So in PostgreSQL we always use the backward slash to do anything.
Let's go ahead and see.
We have our SQL shell because that is what we are going to be using right in here.
And I will also be showing you that on the Pgadmin as well.
So if I go ahead and select the local server or go ahead, I hit enter and our database PostgreSQL.
And then we go ahead and select the ports 5432.
Go ahead and enter the username.
And then we'll go ahead and enter our password as 1234.
Let's go ahead and hit on this.
So in PostgreSQL you use the backward slash for everything you want to do.
Let me say I want to tick for hell.
You can type help, and if you want to do that, you go ahead and, uh, see backward slash and then
you go ahead and hit on type help.
And if you click on that you're going to get all these.
You see that.
So we use a backward slash to actually execute programs in SQL shell.
Now I'll go ahead and close these because I have another shell right behind.
Now let's go ahead and create our first database.
And we're going to use the backward slash for this and every other thing we're doing.
Go ahead and hit enter.
And then we'll go ahead and put our password 1234.
You're always going to use a stronger password for this.
And then you go ahead and connect.
Now if I want to view all this database go back to our Pgadmin.
We have a memoir.
We have Postgres and uh edit database.
I want to view.
If I want to do that, all I need to do is put a backward or slash and put L.
Any time you add L to these, you go ahead and hit enter and you can see the database you have.
I have a memoir, I have Postgres, I have a template and templates one nice templates and template
one.
So I have four of this database right in here.
But we have not created our own database.
Now let's go ahead and create our very first database in this course.
So to create a database what we are going to do is we are not going to use the backward slash for creation
of the database, but for the kitchen, uh, all these commands you go ahead and use backward slash.
But to create your actual database, you're not going to use the backward slash or you're going to use
is you're going to use a keyword called create.
And this keyword is not case sensitive.
It can be lowercase.
It can be uppercase.
All right.
So you can use it in lowercase or uppercase.
But for this course and for professional levels you always use the uppercase in order to differentiate
your keywords and the SQL queries.
All right.
Coherency.
Great.
Uh, database.
And then you give the name of the database you want to create.
So you go ahead and add your name.
Let me go ahead and say give your database name according to the project you're working on.
I can go ahead and see.
I'm creating a database for students and I can say create database student and go ahead and put a semicolon
at the end.
Ensure you add a semicolon at the end of your database creation or any of the commands or any of your
query.
That would be the semicolon at the end.
Then go ahead and hit enter.
And uh under here you can see Create database.
Now let's go to Pgadmin four.
And now I want to create a hit on Postgres or right click I refresh this and check it out.
And now we have students right in here.
And we have student database already created.
You can actually go ahead and hit on students.
And down here you can see we have students that have created for us and go to schemas and under the
tables.
We have no team created under here right now.
So that is a new database we just created and that is the student database.
So whatever you do inside the SQL shell you can always go back here.
Refresh the database and you will see your database right in here.
That is cool.
So that is the creation of database on SQL and using the SQL shell for PostgreSQL.
Right.
So that is the database creation for PostgreSQL.
And I hope that is cool.
So pull it down and practice with it.
And if you have any questions on this, go ahead and use the question and answer section.
And I'm going to get back to you as soon as possible.
Thank you so much.
And I'm going to see you in the next video lecture.