Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Otro

DAD-220 Module 3 Lab Submission

Puntuación
4.6
(5)
Vendido
13
Páginas
17
Subido en
14-03-2021
Escrito en
2020/2021

Completed Lab submission with source code and screenshots for references.

Vista previa del contenido

Module Three Lab Three: Table Joins
1.In this lab, we continue working with our database we established in module 1 and furthered in module 2. Our goal is to practice the applications of JOIN clauses. We must change our file permissions through the shell script provided. The ‘chmod +x’ makes ‘change_perm.sh’ change the permissions on itself to make it executable as a program. And the ./change_perm.sh executes the script. Then we launch MySQL as usual by entering ‘mysql’ and pressing Enter.
Continuing we connect to the established database
USE delehant
and perform a SELECT Statement to verify we have connected to the right information.
SELECT * FROM Employee; 2.My next task was updating the “Branches” table name to match the chosen name of “Department” for this assignment. The assigned method of doing this is through an ALTER/RENAME statement.
ALTER TABLE Branches
RENAME TO Department;
3.With the Department table newly named, I then set about adding fields to the empty table. Without this, we would be unable to perform the necessary joins to satisfy the proper output.
a.To add our data, we will be using an INSERT statement. In this instance, the code is already provided.
INSERT INTO Department VALUES (1, 'Accounting'), (2, 'Human Resources'), (3, 'Information Systems'), (4, 'Marketing');
b.I then validate by a SELECT statement to check the table results. SELECT * FROM Department;
4.With our tables populated, we look to create joins between the Department and Employee
tables. Using our SELECT statement, it will join records of Departmet_Name with the first and last names of the employees that belong to each corresponding Department_ID we select. a.Starting with Department 1 = Accounting.
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.Someone once said a good programmer is a lazy programmer. Not sure if I agree, but copy and paste can be practical if used with diligence. Identical select statements will work moving forward by simply changing Department_ID = to the corresponding number. Department 2 = Human Resources
SELECT First_Name, Last_Name, Department.Department_Name

Información del documento

Subido en
14 de marzo de 2021
Número de páginas
17
Escrito en
2020/2021
Tipo
OTRO
Personaje
Desconocido
$5.98
Accede al documento completo:
Comprado por 13 estudiantes

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Reseñas de compradores verificados

Se muestran los 5 comentarios
1 año hace

2 año hace

2 año hace

4 año hace

5 año hace

4.6

5 reseñas

5
3
4
2
3
0
2
0
1
0
Reseñas confiables sobre Stuvia

Todas las reseñas las realizan usuarios reales de Stuvia después de compras verificadas.

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Riveneye Southern New Hampshire University
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
380
Miembro desde
5 año
Número de seguidores
225
Documentos
51
Última venta
1 mes hace

4.2

66 reseñas

5
43
4
10
3
2
2
4
1
7

Documentos populares

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes