Student Solution

-->

"Education is the most powerful weapon which you can use to change the world”
– Nelson Mandela

1 University

1 Course

1 Subject

1-4 Lab

1-4 Lab

Q Overview Codio is an online integrated development environment (IDE) where you’ll perform the labs for this course. In this assignment, you’ll practice using structured query language, or SQL, in Codio. Directions Go to your Codio lab environment and start a new terminal session to complete this assignment. Then, follow the steps below to get practice with MySQL. SQL needs very specific input language. It’s important to note that spelling, capitalization, letters, numbers, and punctuation marks must be entered into Codio the exact way that they appear in your instructions. To show that the commands you’ve written worked, capture them with a screenshot and place them in a document for submission. Your work should be organized like the Module One Lab Screenshot Example. Look at the Additional Support section in the Resources area of this module for information that will assist you as you work through this lab. To complete this lab, follow the steps shown below: 1. Create a new database and update the name to your last name, then connect to it. Type the following commands after the prompt mysql>: A. create database last_name_here; i. For example, if your database is going to be named Jetson, then substitute Jetson for “last_name_here.” ii. Press Enter. B. show databases; i. Press Enter. ii. You should see a listing of all of the databases (or schemas) in MySQL, including the one you just created. C. use last_name_here; i. Press Enter. ii. Substitute the name of your database (for example, Jetson) for “last_name_here”. This SQL statement connects your MySQL session to the database you’ve just created. iii. Capture a screenshot or clipping of the results of this action, and place it in a Word document for submission. 2. Create a table called tb2 and list out the tables in your database with one field by typing the following commands after the prompt mysql>: A. create table tb2 (user_id VARCHAR( 50 )); i. Press Enter. B. show tables; i. Press Enter. C. describe tb2; i. Press Enter. ii. Capture a screenshot or clipping of the results of this action, and place it in a Word document for submission. 3. Add a second field into the table and describe it. Do this by entering the following commands after mysql>: A. alter table tb2 add newfield VARCHAR(25); i. Press Enter. B. describe tb2; i. Press Enter. ii. Capture a screenshot or clipping of the results of this action, and place it in a Word document for submission. 4. Organize your work by following the guidelines presented in the example mentioned above. A. Follow standard guidelines for submitting the work to show that commands you’ve written for this lab worked. What to Submit Submit all screenshots, clippings, or text in a Word document with 12-point Times New Roman font, double spacing, and one-inch margins. Each screenshot and its explanation should be sized to approximately one quarter of the page, with a description written below the screenshot.

View Related Questions

Solution Preview

Create a new database and update the name to your last name, then connect to it. Type the following commands after the prompt mysql>: A. create database Kline; i. Press Enter. B. show databases; i. Press Enter. ii. You should see a listing of all of the databases (or schemas) in MySQL, including the one you just created. C. use Kline; i. Press Enter. Angelo Kline DAD-220-T3445 Intro to Struct Database Create a table called tb2 and list out the tables in your database with one field by typing the following commands after the prompt mysql>: A. create table tb2 (user_id VARCHAR( 50 )); i. Press Enter. B. show tables; i. Press Enter. C. describe tb2; i. Press Enter.