SQL Module 9 - Assignment - Creating and Manually Populating A Database Table
SQL Module 9 - Assignment - Creating and Manually Populating A Database Table
SQL Module 9 - Assignment - Creating and Manually Populating A Database Table
Background
Until now you have been working with a single table to answer questions. The database and
table structure were defined for you.
Now you are going to learn how to modify the structure of the database by adding another table
to store specific data about Providers.
Preparation
Complete the SQL homework tutorials for this week before attempting this assignment.
Notes:
1. Your button may say “Local instance” instead of “primary”. That’s fine.
2. The numbers on your button may be different; that’s fine too.
3. If your primary button has disappeared, watch the video in Canvas that shows
how to recreate it. The link is in Module 4 on the M4: SQL Frequently Asked
Questions page.
Rev.3/08/17 Page 1 of 5
2. If your Assignment schema (lower left corner) is not bolded, double-click it to make it
active (bold).
3. Create a table for provider data using SQL
To run your command, highlight the line you typed and then click the yellow lightning
bolt on the toolbar.
Tip: you can explore the Columns, Keys, and DDL tabs to compare the query you entered
earlier with the database structure that the query created.
Rev.3/08/17 Page 2 of 5
Add some providers into your Providers table
Now that you have a Providers table, you need to put some physicians and nurses into it. Note
that there are multiple ways to get data into a database table; this way will show you how to
enter a few records manually.
Note: Your results pane will be empty; this is because it is inserting data into the table, not
displaying the results of a SELECT query. Once you run a SELECT, you’ll see the results panel as
normal.
6. Display all the information on your Providers from your Providers table:
Tip: If you receive an error code 1146, check the spelling and case of your Providers
table.
Rev.3/08/17 Page 3 of 5
7. Take a screen shot of your displayed provider records along with the syntax.
a. On the VirtualBox menu bar, click View Take Screenshot
b. In Save As: enter yourlastname_yourfirstname_m9
c. In Where: choose your Desktop.
d. Click Save.
Make sure your display shows all three panels: the command panel at the top, the
output in the middle, and the messages at the bottom. You won’t be able to show
all the SQL statements and that is OK – just make sure that the three provider
records show completely.
Rev.3/08/17 Page 4 of 5
8. Name your file yourlastname_yourfirstname_m9 and turn in the screen shot to the
assignment in Canvas. You do not need to turn in the SQL statements, just the screenshot
of the displayed provider records in your database.
Rev.3/08/17 Page 5 of 5