Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In SQL, given the table mapping and SQL proclamation: Create and check the data using a set of test data scripts within an SQL program

In SQL, given the table mapping and SQL proclamation: Create and check the data using a set of test data scripts within an SQL program (preferably SQLServerDatabases, but anything that works is fine), and provide the results. if anything is necessary to add to the table and proclamation data for it to function as a propper gradebook, add such so that a working test is possiible, then test and provide results. (a step by step on generally doing this would also be nice, but it's not required)

Make TABLE Classes ( ClassID int Essential KEY IDENTITY(1,1), Name nvarchar(255) NOT Invalid );

Make TABLE Understudies ( StudentID int Essential KEY IDENTITY(1,1), Name nvarchar(255) NOT Invalid, ClassID int NOT Invalid, GPA decimal(5,2) Invalid, Unfamiliar KEY (ClassID) REFERENCES Classes(ClassID) );

Make TABLE Instructors ( TeacherID int Essential KEY IDENTITY(1,1), Name nvarchar(255) NOT Invalid, ClassID int NOT Invalid, Unfamiliar KEY (ClassID) REFERENCES Classes(ClassID) );

Make TABLE Things ( ItemID int Essential KEY IDENTITY(1,1), Name nvarchar(255) NOT Invalid, Type nvarchar(255) NOT Invalid, Weight decimal(5,2) NOT Invalid, ClassID int NOT Invalid, Unfamiliar KEY (ClassID) REFERENCES Classes(ClassID) );

Make TABLE Grades ( GradeID int Essential KEY IDENTITY(1,1), StudentID int NOT Invalid, ItemID int NOT Invalid, Grade decimal(5,2) NOT Invalid, Unfamiliar KEY (StudentID) REFERENCES Students(StudentID), Unfamiliar KEY (ItemID) REFERENCES Items(ItemID) );

SET GPA = ( SELECT SUM(Grade * Weight)/SUM(Weight) FROM Grades JOIN Things ON Grades.ItemID = Items.ItemsID WHERE Grades.StudentID = Students.StudentsID );

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

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago