Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

Purdue University Global Advanced SQL and Virtual Machine Coding

Purdue University Global Advanced SQL and Virtual Machine Coding

I’m working on a computer science question and need support to help me study.

Section 1

You will need to install and use Microsoft SQL Server Express and Microsoft SQL Server Management Studio (SSMS) for this Assessment. You can download the latest versions of these free software products here:

Microsoft SQL Server Express

Microsoft SSM

The module assessment consists of two tasks, and you will generate a Microsoft Word report from the completed work. You will use the Northwind database for both tasks. Deploy the Northwind database into your Microsoft SQL Server instance by executing the following script in a Microsoft SQL Server Management Studio (SSMS) query window:

It is very important that you watch the module videos associated with DML and DCL prior to completing the assessment. Navigate to the Academic Tools area of this Module and select Library then Required Readings to access your texts and videos.

Task 1 – Retrieving Data Using Advanced Queries

Once the Northwind database is successfully deployed, generate SQL statements to address the problems below. Use the following database design diagram as a guide in forming your statements:

Your assessment report needs to show both the generated SQL statements and confirmatory screenshots verifying problem completion.

Problem 1: Create a report of “seafood” and “produce” products, showing ProductID, ProductName, and CategoryName. Incorporate an inner join condition for this query.

Expected Output

"The expected query output showing the ProductID, ProductName, and Category Name of 'seafood' and 'produce' products."

Problem 2: List the last name, first name, title, and salary of company employees with salaries above the company average. Use a non-correlated subquery in the SQL statement.

Expected Output

"The expected query output showing the last name, first name, title, and salary of company employees with salaries above the company average."

Problem 3: List the average salaries for employees in Seattle and London. The averages need to be calculated on a per city basis. Use a union operation to generate the results. (Hint: Use one SQL statement to calculate the average salary for one city and another almost identical SQL statement to calculate the average salary for the other city.)

Expected Output

"The expected query output showing the average salaries of Seattle and London employees."

Problem 4: Show the product names for products that have been ordered in quantities equal to or exceeding 120. Use a non-correlated subquery in the SQL statement.

Expected Output

"The expected query output listing the products that have been ordered in quantities equal to or exceeding 120."

Problem 5: List the supplier names and cities for suppliers that reside in the same cities as Northwind employees. Use a non-correlated subquery in the SQL statement.

Expected Output

"The expected query output listing the supplier names and cities for suppliers residing in the same cities as Northwind employees."

Problem 6: Display the names of Northwind employees that manage territories located in the Western region. Use inner joins in the SQL statement linking the Employees, EmployeeTerritories, Territories, and Region tables. Do not show duplicate employee names in the result set.

Expected Output

"The expected query output listing the names of Northwind employees that manage territories in the Western region."

Problem 7: Display customer names, cities, and order IDs for customers residing in Madrid or Paris. Show all customers regardless of whether they have placed orders or not. Use an outer join in the SQL statement.

Expected Output

"The expected query output listing the customer names, cities, and order IDs for customers residing in Madrid or Paris."

Problem 8: Display a combined list of supplier and shipper names along with their phone numbers. Use a union operation in the SQL statement. Present the results in alphabetical order based on CompanyName.

Expected Output

"The expected query output displaying a combined list of supplier and shipper names along with their phone numbers."

Problem 9: Show the employee names, salaries, and countries for employees that have salaries above the average salary within their respective countries. Use a correlated subquery in the SQL statement.

Expected Output

"The expected query output showing the employee names, salaries, and countries for employees that have salaries above the average salary within their respective countries."

Problem 10: Display the names of products supplied by vendors in the USA and Norway. Show the product country in the result set. Present the results in alphabetical order by product name. Use an inner join in the SQL statement.

Expected Output

"The expected query output displaying the names of products supplied by vendors in the USA and Norway."

Task 2 – Transactions and Security Implementations

You will need to change the authentication method used by Microsoft SQL Server in order to complete this task. Perform this change using the following guidance document:

You can now proceed with work on the task problems below. Your assessment submittal needs to show both the generated SQL statements and confirmatory screenshots verifying problem completion.

Problem 1: Create a view called EmployeeDirectory that displays the first name, last name, title, and phone extension of all employees in the company.

Problem 2: Create a stored procedure that increases an employee’s salary by a raise percentage. The skeleton of the stored procedure is provided below.

CREATE PROCEDURE GiveEmployeeRaise
@EmployeeID INT, @RaisePercentage DECIMAL
AS
<REPLACE WITH YOUR SQL CODE>

The equation for computing a new salary is as follows:

New Salary = Old Salary * (1 + Raise Percentage/100)

If an employee with EmployeeID = 9 gets a 5% raise, the stored procedure call would be as follows:

EXEC GiveEmployeeRaise @EmployeeID = 9, @RaisePercentage = 5;

Problem 3: Create and execute a transaction block that contains two DML statements. The first statement updates the title for all employees to “President.” The second statement inserts a new region record with a RegionID = 10 and a RegionDescription = “Antarctica.” Incorporate these statements within the SQL block specified below:

BEGIN TRANSACTION

<REPLACE WITH INSERT/UPDATE STATEMENTS>

SELECT * FROM Employees;
SELECT * FROM Region;

ROLLBACK TRANSACTION

SELECT * FROM Employees;
SELECT * FROM Region;

Execute the completed SQL block in a Microsoft SSMS query window.

Briefly explain what happened with the execution of this transaction. Provide the before and after screenshots of the data contained within the Employees and Region tables. Please note the query results will appear in 4 separate sections in the Results area of Microsoft SSMS following execution of the above SQL block.

Problem 4: You are asked to add three new products to an existing order with OrderID = 11061. The additional records need to be added to the OrderDetails table with the following information:

Record 1
OrderID = 11061
ProductID = 62
UnitPrice = 45
Quantity = 10
Discount = 0

Record 2
OrderID = 11061
ProductID = 70
UnitPrice = 14
Quantity = 25
Discount = 0

Record 3
OrderID = 11061
ProductID = 1000
UnitPrice = 100
Quantity = 5
Discount = 0

Incorporate the SQL insert statements for the new records into the transaction block specified below and execute in a Microsoft SSMS query window:

BEGIN TRANSACTION NewOrderDetails

BEGIN TRY

<REPLACE WITH INSERT STATEMENTS>

COMMIT TRANSACTION NewOrderDetails;

END TRY

BEGIN CATCH

ROLLBACK TRANSACTION NewOrderDetails

END CATCH

SELECT * FROM OrderDetails
WHERE OrderID = 11061;

Briefly explain what happened with the execution of this transaction. Do the new records get inserted into the OrderDetails table? If not, why?

Problem 5: Create four new roles in the Northwind database:

  • SalesPerson
  • SalesManager
  • HRperson
  • HRmanager

Problem 6: Use Data Control Language (DCL) statements that manage database user permissions.

  • Grant select, insert, and update permissions for Sales-related tables (Orders & OrderDetails) to the SalesPerson role.
  • Grant select and delete permissions for Sales-related tables to the SalesManager role.
  • Grant select permissions for the EmployeeDirectory view to the SalesPerson and SalesManager roles.
  • Grant select, insert, and update permissions for HR-related tables (Employees & EmployeeTerritories) to the HRperson role.
  • Grant select and delete permissions for HR-related tables to the HRmanager role.
  • Grant execute permission for the GiveEmployeeRaise stored procedure to the HRperson role

Problem 7: Create four new users named Jane, Joan, Joe, and James. Use the CREATE LOGIN and CREATE USER commands to accomplish the work. Each established Northwind database user account must be associated with an applicable SQL Server login account (e.g., CREATE USER Jane FOR LOGIN Jane). Please note, you must establish the SQL Server login accounts before the database-level usernames. Use the following password for each of the four SQL Server login accounts: P@$$w0rd

Problem 8: Grant the roles specified below to Jane, Joan, Joe, and James.

  • Give Jane the role of SalesPerson.
  • Give Joan the role of SalesManager.
  • Give Joe the role of HRperson.
  • Give James the role of HRmanager.

Use the ALTER ROLE command to accomplish the role granting work.

ALTER ROLE <role_name> ADD MEMBER <user_name>;

Problem 9: In Microsoft SSMS, right-click on the SQL Server instance at the top of the tree in the Object Explorer window. Select the Connect item from the right-click menu.

"The right-click menu showing the location of the SQL Server instance Connect option."

The login prompt will appear. Select “SQL Server Authentication” from the Authentication drop down box. Enter “Jane” and “P@$$w0rd” into the Login and Password fields, respectively. Click on the Connect button when finished.

"The 'Connect to Server' prompt in the Microsoft SQL Server Management Suite (SSMS) application showing

You will now be connected to the SQL Server instance as “Jane.”

"The Microsoft SSMS Object Explorer window pane showing a new connection to the SQL Server instance as a user called 'Jane'."

Expand the Databases item under “Jane.” Right-click on the Northwind database item and select the New Query item in the right-click menu.

"The right-click menu showing the option for invoking a New Query window."

Generate SQL statements in the query window to do the following:

  • Update the order quantity to 50 for OrderID = 10249 and ProductID = 51.
  • Delete the record in OrderDetails with OrderID = 10251 and ProductID = 65.
  • Select all of the records from the Employees table
  • Select all of the records from the EmployeeDirectory view established in Problem 1 of Task 2

Provide screenshots of the SQL statement outputs. Provide a brief explanation for any statement that failed to execute

Problem 10: Connect to the Northwind database as “Joan” using the steps specified in Problem 9 of Task 2. Generate SQL statements in the query window to do the following:

  • Update the order quantity to 60 for OrderID = 10249 and ProductID = 51.
  • Delete the record in OrderDetails with OrderID = 10251 and ProductID = 65.
  • Select all of the records from the Employees table
  • Select all of the records from the EmployeeDirectory view established in Problem 1 of Task 2

Provide screenshots of the SQL statement outputs. Provide a brief explanation for any statement that failed to execute

Problem 11: Connect to the Northwind database as “Joe” using the steps specified in Problem 9 of Task 2. Generate SQL statements in the query window to do the following:

  • View all of the records contained in the Orders table.
  • Give a 5% raise to the employee with EmployeeID = 9 using the GiveEmployeeRaise stored procedure
  • Select all of the records from the Employees table
  • Select all of the records from the EmployeeDirectory view

Provide screenshots of the SQL statement outputs. Provide a brief explanation for any statement that failed to execute

Problem 12: Connect to the Northwind database as “James” using the steps specified in Problem 9 of Task 2. Generate SQL statements in the query window to do the following:

  • Give a 10% raise to the employee with EmployeeID = 8 using the GiveEmployeeRaise stored procedure established in Problem 2
  • Update the title to “Gamemaster” for the employee with EmployeeID = 9
  • Select all of the records from the Employees table
  • Select all of the records from the EmployeeDirectory view

Provide screenshots of the SQL statement outputs. Provide a brief explanation for any statement that failed to execute.


Section 2

Part 1

Watch the following video tutorial:

Installing Linux in VirtualBox

Download and Install Oracle VirtualBox. The download is available from the VirtualBox website at https://www.virtualbox.org

  • Take a screenshot showing the downloaded file on your PC.
  • Show a picture of the main GUI interface for VirtualBox.

Use VirtualBox, to create multiple VMs on your Windows computer.

You will download at least one other operating system to illustrate the VM concept.

From your Imagine account, download a current version of Windows Server and/or Windows Professional.

For the operating system you downloaded and installed:

  1. Take a screenshot of the virtual machine name within the VirtualBox Interface.
  2. Take another screenshot of the settings option, then storage to display your selected storage options.

From the VirtualBox control pane, complete the following:

  1. Name your instances.
  2. Create a VM, install Windows.
  3. Create a VM, any other Windows or Linux version.

Part 2

After you complete Part 1, complete the following:

Write a 2-page paper describing the process you went through to install the VirtualBox software and then describe any issues or roadblocks experienced during the build of the first virtual machine.

Minimum Submission Requirements

  • This Assessment should be a Microsoft Word (minimum 350 words) document, in addition to the title and reference pages.
  • Respond to the questions in a thorough manner, providing specific examples of concepts, topics, definitions, and other elements asked for in the questions. Your paper should be highly organized, logical, and focused.
  • Your paper must be written in Standard English and demonstrate exceptional content, organization, style, and grammar and mechanics.
  • Your paper should provide a clearly established and sustained viewpoint and purpose.
  • Your writing should be well ordered, logical and unified, as well as original and insightful.
  • A separate page at the end of your research paper should contain a list of references, in APA format. Use your textbook, the Library, and the internet for research.
  • Be sure to cite both in-text and reference list citations were appropriate and reference all sources. Your sources and content should follow proper APA citation style. For assistance with APA requirements, please go to APA Style Central. You will find the link in the Academic Tools section of the course. (It should include a cover sheet, paper is double-spaced, in Times New Roman 12-point font, correct citations, Standard English with no spelling or punctuation errors, and correct references at the bottom of the last page.

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Fox Writers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Fox Writers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Fox Writers is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Fox Writers, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.