Question: In SQL This is the base information for a Gradebook Using the current tables ad provided information as a base, add the additional necessary values,

In SQL

This is the base information for a Gradebook

Using the current tables ad provided information as a base, add the additional necessary values, logical operations, etc to:

* allow each of the "Items" (assignments) created to hold a value for each student of the class each item is assigned to,

* create a GPA for each student that calculates their grade and accounts for the weight of each assignment.

* (basically anything else that would turn this into a propper functioning gradebook. Also feel free to change things if necessary)

CREATE TABLE Classes (

ClassesID int PRIMARY KEY IDENTITY(1,1),

Name nvarchar(255) NOT NULL

)

CREATE TABLE Students (

StudentsID int PRIMARY KEY IDENTITY(1,1),

Name nvarchar(255) NOT NULL,

ClassID int NOT NULL,

FOREIGN KEY (ClassID) REFERENCES Classes(ID)

)

CREATE TABLE Teachers (

TeachersID int PRIMARY KEY IDENTITY(1,1),

Name nvarchar(255) NOT NULL,

ClassID int NOT NULL,

FOREIGN KEY (ClassID) REFERENCES Classes(ID)

)

CREATE TABLE Items (

ItemsID int PRIMARY KEY IDENTITY(1,1),

Name nvarchar(255) NOT NULL,

Type nvarchar(255) NOT NULL,

Weight decimal(5,2) NOT NULL,

FOREIGN KEY (ClassID) REFERENCES Classes(ID)

)

The relationships are as follows:

one+ - to - one+ between Classes and Students

one - to - zero+ between Teachers and Classes

one+ - to - many between Students and Items

one - to - many between Classes and Items

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!