Question: 1 . Review the SQL statements contained in the file below. SQL Schema: grades . sql Summarize all constraints ( L 2 . 1 The
Review the SQL statements contained in the file below.
SQL Schema:gradessql
Summarize all constraints L The Relational Model & Ch in this schema
Find and fix a minor SQL syntax error in the given schema
Create a database using the queries specified in the schema linked above gradessql
Record that the Database Management Systems course is a credit course with number and is capped at students.
Record that prof. Smith graded Susan Cooper for the databases courses in term with a B on January
Record that Prof. Smith updated Susan Cooper's grade from a B to an A on January
Write a query that answer the following question: What are the last names of the students?
Write a query that answer the following question: What courses are offered in term
Write a query that answer the following question: Which students scored a B or higher for the databases course in term
Write a query that shows the grade roster firstname lastname, grade in the databases course, sorted by grade highest to lowest
All courses and all sections CREATE TABLE courses courseid INTEGER, coursename VARCHAR NOT NULL, credits REAL NOT NULL, maxstudents INTEGER NOT NULL, PRIMARY KEY courseid; People CREATE TABLE people personid INTEGER, lastname VARCHAR NOT NULL, firstname VARCHAR NOT NULL, dob DATE, gender char isstudent INTEGER NOT NULL, isprofessor INTEGER NOT NULL, PRIMARY KEY personid CHECK gender in MFO; Records all grades for all students CREATE TABLE grades studentid INTEGER, courseid INTEGER, term VARCHAR grade VARCHAR NOT NULL, professorid INTEGER NOT NULL, gradedate DATE NOT NULL, PRIMARY KEY studentid courseid, term FOREIGN KEY studentid REFERENCES peoplepersonid FOREIGN KEY courseid REFERENCES courses, FOREIGN KEY professorid REFERENCES peoplepersonid CHECK grade IN FIDCCCBBBAAA; Data load INSERT INTO people personid lastname, firstname, dob, gender, isstudent, isprofessor VALUES 'Smith', 'John', M; INSERT INTO people personid lastname, firstname, dob, gender, isstudent, isprofessor VALUES 'Doe', 'Jane', F; INSERT INTO people personid lastname, firstname, dob, gender, isstudent, isprofessor VALUES 'Greene', 'David', M; INSERT INTO people personid lastname, firstname, dob, gender, isstudent, isprofessor VALUES 'Cooper', 'Susan', F;
Please help with this ill leave a good review I need to understand this more.
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
