Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment: This is a continuation with the database created in Assignment 5. Include a screen shot of the database diagram for your database. Create Table-Valued

Assignment: This is a continuation with the database created in Assignment 5. Include a screen shot of the database diagram for your database. Create Table-Valued function, create View to demonstrate its use, and include a screen shot of the results of running the View. Create Scalar-Valued function, create View to demonstrate its use, and include a screen shot of the results of running the View.

Purpose: To demonstrate your understanding of Views, Table Functions, and Scalar Functions

Requirements:

  • Note: This assignment includes 4 DDL SQL Statements and 3 screen shots
  • Include a "screen shot" of the SQL Server Management Studio "Database Diagram" showing the tables, columns, keys, and relationships
  • Show the SQL statement that creates a Table Function that returns the CourseID, Semester, and AverageScore for given a student
  • Show an SQL statement that creates View that uses this table function with the StudentID of 1234
  • Include a "screen shot" of the SQL Server Management Studio that shows the output of running the View above
  • Show the SQL statement that creates a Scalar Function that will return the average for all scores for a given student
  • Show an SQL statement that creates a View that uses this scalar function showing FirstName, LastName, and AllScoreAverage for all students
  • Include a "screen shot" of the SQL Server Management Studio that shows the output of running the View above

Output:

The output from the table function using student 1234 should look similar to this:

CourseID Semester AverageScore
CIS4301 202001 84
CIS4352 202001 87
CIS3365 202006 82
CIS3315 202006 75
CIS4301 202008 62

The output from the scalar function for all students should look similar to this:

FirstName LastName AllScoreAverage
John Smith 78
Tony Costa 87
William Bonin 78
David Carpenter 78
Richard Chase 81
Carroll Cole 77
Arthur Bishop 89
Charles Albright 85
Joe Ball 84

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamental Managerial Accounting Concepts

Authors: Edmonds, Tsay, olds

6th Edition

71220720, 78110890, 9780071220729, 978-0078110894

More Books

Students also viewed these Databases questions

Question

What is the purpose of the statement of cash flows?

Answered: 1 week ago