Welcome back to module to databases. This is less than three basic admin.
Within this lesson, we're going to go over to basic concepts, and that is how to back up a database and how to restore data base in the di beaver application.
So I have D Beaver Open
and I have this example database that we just made in the previous lessons
I'm going to right click it
and then dumped database.
So a back of a database is often called a dump, and the reason it's called that is because often the process just
dumps all the create statements you would need to restore the database later.
So in the first screen you get to select the databases you want to
back up and the tables within the database. You want a backup, and by default, the selection is based on where you selected to begin the process.
So, for example, if we wanted to back up the example database,
this would be perfectly fine. We're backing up this database with thes three tables,
and again these default options are pretty much fine. The only thing you might want to do is lock all tables on. The reason you're doing that is that if there's any application using your database,
you will lock the table so that they cannot add new data while you're backing up the database,
good practice just because you could accidentally get some corruption in the data
if someone happens to be trying to update something right when you hit the back of button.
So once you have these
other default options selected, you would just click start taking note of the directory that it's going to
and it's done. And of course, the speed of that will depend on the database
that you have backed up.
And that is how you back up a database in DV ver.
So now let's look at restoring a database.
So I have also dumped the employees database, which was a sample database that we work we worked on in a previous lesson. You can see it's a much larger database, and that's because it dumped out with all that extra test. Out of that,
they were kind enough to provide within with that sample database, so I'm gonna go ahead and restore that
now. It is common for, um it is common for the restore Falls to not actually name the database. So sometimes you will need to create the database. So I'm gonna go ahead and create a new database and call it employees
I will go ahead and set That is active. And then I'm gonna right click it again
and selected tools and select Restore Data Days.
And we need to find that file that we backed up, which is this file,
and the default options were fine.
And now you can simply hit start,
and that is a larger database. So that will probably take just a little bit of time
So I will go ahead and pause the video and fast forward to the completion of that important.
Okay, The database import completed
it. Ah, took roughly. I want to say about a minute and 1/2 to complete that,
and we'll close that will take a look at our database. Let's go ahead and click on the employees table. Make sure that it's
So we have all the data there again.
And if you were to look inside those backup files, you would see exactly what it's doing.
So it's too classic models. It's a smaller database.
so you can see it's creating. It's running the create table
after it drops it if it exists. So it checks the table existed and drops it,
and then it inserts all the values that it had into the table
when you backed it up. Now it is common
for text editors to not be able to open and work well with large files such as this,
and that's fine. You don't need to be too concerned with that. The import process will correctly parts the data. It's just really a question of how much time that will take to complete.
Usually even with a large volume of that. It doesn't take a terrible, terribly long time to complete,
so that completes this lesson in this lesson. Again, we learned how to back up and restore a database using D beaver. That process will allow you to, you know, save databases that you're working on and move them to new computers if you need Thio.
So I hope you enjoy this lesson and the next module
module three programming we're gonna start to have some real fun getting to the sequel statements, complex queries, views and the combination of the solutions. So I hope to see you there. Thank you.