Question: a . Write a SQL column definition for BankBalance ( just for one column, don't worry about the rest of the table ) that ensures
a Write a SQL column definition for BankBalance just for one column, don't worry about the rest of the
table that ensures that balance must be between and column definition should enforce both the
number precision and greaterthan requirement
b Write a SQL column definition for Street just for one column, don't worry about the rest of the table that
ensures that the street address is up to characters and has to start from 'Nor' hint: CHECK constraint can
use LIKE operator
c The following set of relations records information about university students, courses and assigned grades. The
Student relation contains information about the student, including the name full name is stored in one column
address and their year of graduation. The Course relation records information about courses: course name
primary key course department and the number of credits provided by the course. Finally, the Grade relation
records information about the grades given; CName is the foreign key referring to the primary key of the Course
relation and StudentID is the foreign key referring to the primary key of the Student relation. The grades are a
numeric value given on a point system.
StudentStudentID Name, Address, GradYear
GradeCName StudentID, CGrade
CourseCName Department, Credits
For each part below, write a single SQL query.
Q Display the list of student IDs and names for the students who graduated in the most recent year. You can assume that
GradYear is an integer, but your query is not allowed to assume any particular year.
Q Display student names and their taken course names for all students with the middle name of 'Stevo. You may assume that
name is always written as 'First Middle Last'. Your query output should be sorted by grade.
Q For students who are either not enrolled in any courses or are enrolled in only course, list those student's names and
graduation years.
Q Update all student records, to increase the graduation year by for all students who live in Chicago.
Q Modify the course table to add a Chair column that can be up to characters that question requires a DDL rather than a
DML SQL statement
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
