Question: Chapter 8 Homework Use the MSU Human Resources database you created to do Chapter 7 homework. If you don t have it , you can
Chapter Homework
Use the MSU Human Resources database you created to do Chapter homework. If you dont have it you can make the database using MSUHRMySQL script provided. Before answering the questions, be familiar with the database structure by referring to the database tables MSU Human resources Database Tables and database model ERD for MSU Human Resources Database documents.
Submission:
Your answer document MUST contain SQL statement and query results for each question.
Copy and paste SQL statements and their results to Microsoft Word or PDF file and submit the Word or PDF file
o Put question # too.
I strongly recommend you start this homework earlier since it will take time to do
There will be NO extension or makeup given.
Note:
You MUST use the SQL commands used in the textbook and the field column names in the tables provided; otherwise, you will NOT get any credits for the question.
When you join tables, you must use the Join on syntax or oldstyle join which is covered in Chapter You may read pages if you dont know what is oldstyle join.
o Do Not use Natural JoinInner Join or Join Using syntax
For downloading, installation, and tutorial information on MySQL refer to the Chapter Materials and Resources folder in the Course Materials section.
Answer the following questions.
Use the SQL statement asked. Otherwise, you will have zero points for the question.
Use the SQL commands used in the textbook, otherwise, you will not get any credits for the question.
Change the length of the department name column in the Departments table to characters. Show the result using the describe command.
Change the department name in the Departments table to Information Technology for the department name entitled IT Show the result using the select command.
Add a location to the Locations table. You choose the data for the new location. Make sure that you need to use the correct data type when entering the data. Show the result using the select command.
Delete the new location you added in # Show the result using the select command.
Change the column name stateprovince to state in the Locations table. Show the result using the describe command. Make sure to use the same data type and data size as the existing one.
Create a new table structure named regions with regionid and regionname fields. The regionid is the primary key of the table. Show the result using the show tables command.
Drop the new table you created in Question # Show the result using the show tables command.
Create a new table from existing tables. The new table will contain the following data: department id and department name, and the street address, city, and state data of the department location. Note: You have to use a SELECT statement in creating and entering data. Show the result using the select command.
Create an index based on the field attributestate in the new table you created in question # You dont need to show the results.
Create a view containing the following data: department name and the city and state data of the department location. Show the result using the show tables and select commands. The show tables command displays the list of tables and views in the database. The select command displays the contents of the view.
Delete the state column from the new table you created in question # Show the result using the describe command.
Create a database named MSU Show the result using show databases command.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
