Tutorial 3.1-How to load/restore DVD rental database to PostgreSQL server16 using pgAdmin| Windows11

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone in my previous video I showed you how you can download and install postra SQL 16 and PG admin on your windows 11 computer okay now in today's video we're going to be looking at how we can load and restore DVD rental database onto that postra SQL 16 that you had installed on your computer and we are going to be using PG admin okay now if you go to this link and by the way for those of you that did not watch the previous video where I showed you how to download and install post grq server 16 and PG admin I'll put the link to that video in the description below okay all right now go ahead to this link right here if you want to download the DVD rental database okay I will also put that in the description below and then when you come right here you can see it says download DVD rental sample database okay now when you download this it's going to be a zip file it's going to be in zip format okay and then we can then extract DVD rental. T file okay it is this DVD rental. file let me make this bigger let's see okay I think it's good very good very good so it is this DVD rental. file that we will then load onto our database okay now let's get started guys let's go to our Windows search bar okay and look for PG admin so just type PG admin and then that's that is it right here I am going to open this right now this is going to take few seconds to open up okay now you can see this is opened right here okay I'm not going to do anything yet I will go back I can just minimize it and then I'll go back to this link and then I will download the DVD rental sample database so I'll click this when I click it you can see it went directly to my to down to it downloaded to my downloads folder I will click that now this is it okay if you look at this is you see that this is a DVD can I make this bigger let's see okay I think so this is DVD rental uh ZIP file that we just downloaded okay if I double click this take note double click once I have seen different people have different problems with installing this okay I have so many people that have you know that have commented on my previous video where I showed how to do this okay however in the previous video where I showed how to do this in some uh video that i' made some month ago in that case that was postgress 15 but this is postgress 16 okay so just double click this once now if you double click this on you can see we have DVD rental this DVD rental is the is the T file even though it doesn't show right here if you double click this again see what happens if I double click this again you can see I am saying DH file right you can see that I'm seeing D file but this is not what I want okay what I want is just go back again just go back one step this is what I want DVD rental this one is the uh the the T file okay let me show you again guys just to make sure that you understand what's going on in my downloads folder I have the zip file so double click once you can see we have DVD rental this is the file then I will right click to copy I will copy then I'll go into my downloads folder then in this downloads folder I can just open a new folder so I'll right click on this new and then I will say open new folder I can just leave it as folder inside of it then I will paste I will say control V I can say control V okay if I say control V you can see I've pasted that so that means that the TR file is inside this new folder take note this new folder that's where we put the TR file okay now let us go back to our PG admin let's go back to our PG admin okay and then we will come right here to servers I'll do servers and then I'll come to postgress Square 16 now you can see it says that please enter the password for the user postgress to connect the server remember that you had created a password before in my previous video where you when when you downloaded the post SQL Server okay so that's same password just enter it right here okay so I will enter mine and then I'll click okay very good now you can see that inside my postgress 16 I have one database which is this postgress this postgress this database comes pre-installed already when you installed the DVD when you installed the post GR Square server okay this postgress database comes along with it okay but now we want to create another uh database okay we want to create the DD rental database okay now let us create the DVD rental database so right click on this then you have create then you click database okay now all we have to do let us give it a name I can just give it this name right I can say DVD rental okay let's give it that name and then I say save just click it once very good now you can see say database connected now it has created DVD rental okay now if you look at this DVD rental if you come right here to schemas open schemas you you can see you have one schema and that is public it's public right if you come to tables if you click on this you can see if you toggle this you don't have any table yet okay now we want to add data into this so all we have to do is come right here to DVD rental right click right click on DVD rental okay and then come to restore restore I'll click that okay and then I will give my I then I'll will come right here I'll say I'll leave this format the way it is then my file name I will try I will navigate to that DVD rental. file that we put in that new folder remember that when we first of all downloaded this was what we downloaded right and then inside this inside this ZIP file we double click it once and we got this so we copied this out and then we created a new folder and put that DVD rental. file but you don't see the file yet but that's fine that's fine so this is what we want to restore okay so take note if you double click you're going to be seeing do D file but this is not what we need okay this is what we need right so you don't need to you don't need to double click and be looking at this this is what we want to install okay or we want to load so we will come right here to this file name I'll click this then I will navigate to my download SP my new folder okay then you come to this place right here you'll say all files so now I can iight this you can see theid renter then I will say open okay now you can see then I will say restore you can see now that when you put it right here it says DVD rental. file you can see that your comp computer was able to recognize that this is T file okay now do restore now very good you can see something happened right here guys it says process started and then now it says process failed so there is a problem somewhere it says restoring backup on the server postgress SQ 16 so there is a problem somewhere this has failed okay but we're going to give a fix to that now okay now to fix this problem what we are going to be doing is we're going to be going to our C drive so let us go to the C drive of our computer if you come to C drive right here okay and I will double click this and then I'll come to program files let me see if I can make this bigger can it be bigger okay can be bigger then I will come to a program file FES double click and then in program files I'm going to look for post gql this is here right here I'll double click that and you can see I have post 16 I will click this and then I'll come to bin I'll double click that and then I will copy I will click control a to highlight all of this okay then I'll do contrl C or you can right click and copy but preferably just do contrl a to highlight everything and then control C to copy okay and then I will come back out I come back out to 16 PR 16 and I'll come to PG admin double click that then I'll come to run time okay so inside this run time right here just click somewhere inside and then just do control V so that you can copy everything that that you just copied from that bin okay so it's going to say the destination as you know some number of files with the same names you can just say replace the files in the destination so I will click this so and then if he's asking if you need to provide administrator permission just say continue okay what you can also just do is you can just check this and just say continue for and just say continue so that it's just going to do that for everything thing okay okay this is going to take few seconds okay this action can't be completed because the folder or a file in it is open in another program close the folder and try again let's see let us let us close our PG add me and then we'll come back right there maybe that's what he talking about we'll see let us uh let us close it okay just to make sure that everything works fine so let's check this and try again okay very good now we have been able to copy from bin and pasted it right here so let us go back again and open our PG admin so I open my PG admin it will take few seconds to open okay now come to servers come to 16 SQL 16 put your password and then click okay you can see we have our DD rental which we had created before now let us right click and let us do restore again and then let us navigate to that that folder is to that file in the new folder so come right here do all files I light this do open and then let's restore again fingers crossed guys let's do restore oh very good now you can see it works now it's a process completed so now we have been able to load our DVD rental database with the data that we downloaded from this part website right here okay so now so now let us verify so what we can do is we can refresh so right click there and look for refresh this is refresh let us refresh okay and then since we have refreshed let us come down right here to DVID rental schemas and look for tables if I open that now you can see right here guys that these are the tables of the DVD rental database 15 tables remember previously we didn't see any table but now we see 15 tables that means we have been able to successfully load and restore the DVD rental database that we downloaded into our postra SQL server and if you come to this uh this page right here it tells us that there are 15 tables in the DVD rental database right and as you can see right here we got 50 tables very good guys very good guys very good we have been able to resolve this issue okay now guys if you finding this video valuable please go ahead right now and subscribe to my channel and also click on the like button and also click on the notification Bell so that you don't miss any of our videos guys it's very important for you to click that like button and subscribe as you know that the more like button we have the more uh the better the YouTube algorithm is going to recommend us even to many more people and also the more we are going to be motivated to even do more fantastic and awesome video for you guys because what that means is that there are people that appreciate what we are doing and there are people that we are impacting positively but if we don't get you know likes we don't get views and all of that then that means no one actually you know is uh uh that means no one is actually finding this valuable so please go ahead and subscribe and click on that like button and help us to share these videos and also help us to uh sing the Praises of our channel to many more people so that many more people can benefit from this all right guys put your comment in the comment section below or if you have any question do not forget to put that in the comment section below I'll see you guys in the next video by bye
Info
Channel: tuplespectra
Views: 2,259
Rating: undefined out of 5
Keywords: postgresql tutorial, postgresql tutorial for beginners, sql tutorial for beginners, sql tutorial, sql, postgresql and pgadmin4, postgresql and pgadmin, pgadmin 4, dvd rental database, dvd rental, restore dvd rental database, load dvd rental, sql tutorial for beginners in english
Id: vEtYJbHCsmo
Channel Id: undefined
Length: 16min 0sec (960 seconds)
Published: Mon Dec 25 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.