Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions