Ex. 2.2 Create database
docx
keyboard_arrow_up
School
Pennsylvania State University *
*We aren’t endorsed by this school
Course
210
Subject
Information Systems
Date
Feb 20, 2024
Type
docx
Pages
7
Uploaded by BailiffWrenMaster830
Ex. 2.2 Create moviesBasic database
Purpose:
create a database using both the wizard and SQL
IT Requirements:
MySQL installed on computers
zyBooks:
2.3 Managing Databases
Required Screenshots
1.
Section: Create database using wizard – Step #7
2.
Section: Drop Database – Step #3
3.
Section: Create Database with SQL – Step #6 (at the end of step #6)
Total Screenshots: 3
STEPS
1.
Start up the MySQL workbench 2.
Connect it to my MySQL instance. If you completed the standard installation of the MySQL Community Edition you should see the three existing databases under the left-hand navigator pane. Remember that in MySQL the term schema and database are interchangeable for all purposes. Create database using wizard
1
We will begin by creating a database. In MySQL workbench, we can use the built-in wizard to create a database or we can write the SQL statement ourselves. To start, we will use the wizard. 3.
Click the new schema button. This brings up a new tab. 4.
Give it the name moviesBasic.
2
The only other options are to change the character set and collation which can be left at default. 5.
Click the apply button
This brings up a new window that shows the actual SQL statement that the workbench is going to execute on my behalf. 6.
Click apply. It says the script was successfully applied and in the output pane below we can see that the change was applied successfully. In the navigator pane there is now a moviesBasic database. 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
7.
Take a screenshot
to submit.
Drop Database
Now we are going to drop this database so we can create it manually with an SQL statement. 1.
Right click on moviesBasic and click drop schema. Be very careful when trying to drop anything in MySQL. Once it is dropped, it is gone.
It is good practice to review the SQL first and just verify that yes, we do want to drop database moviesBasic. 4
2.
Click execute And moviesBasic is gone. 3.
Take another screenshot
to submit.
5
Create database with SQL
4.
Open up a new SQL tab and type CREATE DATABASE moviesBasic;
5.
Click the execute button
In the output pane it says create database moviesBasic. 1 row affected.
That is usually a good sign. Note the green checkmark.
There is no movies database under the navigator pane yet. Sometimes you need to right click and select refresh. It is a good habit to always refresh.
6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
6.
Right click and refresh And there is the movies database. Students should take another screenshot
to submit.
--------------
7