DAD 220 Module Three Lab
.docx
keyboard_arrow_up
School
Southern New Hampshire University *
*We aren’t endorsed by this school
Course
DAD-220-X3
Subject
Mechanical_engineering
Date
Jun 4, 2024
Type
docx
Pages
7
Uploaded by MasterButterflyPerson397
DAD 220 Module Three Lab Template Overview
To complete this lab, go to your Codio virtual lab environment and start a new terminal session. Once there, connect to the employee information you entered in the Module Two lab
. Then perform the steps below to complete the activity. Manually enter any commands you are asked to write. At the end of each step in the activity, replace bracketed text with a screenshot, brief explanation, or both, as indicated. Size each screenshot and its explanation to fit about one-quarter of the page with the
description written below the screenshot. Review the Template Screenshot Example linked in the guidelines and rubric for this assignment to see an example of how screenshots for your assignment should look.
Create Joins Between Tables
1.
Update the name of the Branches table
that you created in the previous lab to say "Department".
A.
Use an ALTER statement to RENAME the Branches table "Department". B.
Capture these outputs in a screenshot to validate that you successfully completed this step.
(SIDE NOTE: Apparently, I DIDN’T NEED TO DO ALTER THE NAME because it was already set as department. I may have done this without realizing.)
2.
Insert fields to the Department table
so that joins can be performed on tables.
A.
INSERT INTO Department VALUES
(1, 'Accounting'), (2, 'Human Resources'), (3, 'Information Systems'), (4, 'Marketing');
B.
Write a SELECT statement for this table to prove this step and validate that it ran correctly with a screenshot. 3.
Perform joins between the Department and Employee tables
and show results
for how many employees work in each of the four departments. This action will only provide information on the records that are already there.
A.
Department 1 = Accounting i.
Command: SELECT First_Name, Last_Name, Department.Department_Name FROM Employee INNER JOIN Department ON Employee.Department_ID = Department.Department_ID WHERE Employee.Department_ID = 1;
B.
Using SELECT statements similar to that above, perform joins to produce results
for the following tables: i.
Department 2 = Human Resources ii.
Department 3 = Information Systems
iii.
Department 4 = Marketing
C.
Capture the results of these joins and validate your work by providing a screenshot. You should have the same number of records as you do employees.
4.
Populate the Employee table with information for 10 new employees
. A.
Give the employees unique names and include attributes for all necessary fields. Note: Reference attributes from the lab in Module Two. Department ID values must be between 1 and 4.
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