Can someone please help me solve the following database management
question a - d please helpPlease note that there is no records given for the tables so it is not possible to provide sample output. Below are the answers:
a.
select number from course where number in (select cnumber from
rank-1 where r1-ssn in (select ssn from student where name = 'Jack
Hernandez')) order by title;
b.
select '1' as rank,c.title,s.name from course c
join rank-1 r1
on c.number=r1.cnumber
join student s
on r1.r1-ssn=s.ssn
where c.number in (
select cnumber from
(select cnumber,count(rnk) cnt from
(select cnumber,r1-ssn rnk from rank-1
union
select cnumber,r2-ssn rnk from rank-2) course_all
group by cnumber) a
where cnt >=20)
union
select '2' as rank,c.title,s.name from course c
join rank-2 r2
on c.number=r2.cnumber
join student s
on r2.r2-ssn=s.ssn
where c.number in (
select cnumber from
(select cnumber,count(rnk) cnt from
(select cnumber,r1-ssn rnk from rank-1
union
select cnumber,r2-ssn rnk from rank-2) course_all
group by cnumber) a
where cnt >=20)
c.
select s.ssn,x.cnt,x.avg_enrl
from
(select a.r1-ssn,a.cnt,avg(c.enrolled) avg_enrl
from
(select r1.r1-ssn,r1.cnt,rnk1.cnumber
from
(select r1-ssn,count(cnumber) cnt
from rank-1
group by r1-ssn
having count(cnumber) >=3) r1
join rank-1 rnk1
on r1.r1-ssn=rnk1.r1-ssn) a
join course c
on a.cnumber=c.number
group by a.r1-ssn,a.cnt) x
join student s
on x.r1-ssn=s.ssn
d.
select cnumber,r1-ssn
from rank-1
intersect
select cnumber,tall-ssn
from tallest
Can someone please help me solve the following database management question a - d please help...
Given the following relational database schema: Student = (SSN, Name, Major) Course = ( CourseNumber , CourseTitle, NumberOfUnits, RoomNumber, DayTime), where DayTime is of the form MW 1:0-2:00. Enrollment = (SSN , CourseNumber, Grade) Express the following queries using SQL statements with minimum number of tables and operations. a. List the SSN and Name of every student who has no grade in at least one course. b. List the name of every student who enrolled in at least two courses....
A University database contains information about students (identified by social security number, or SSN) and courses (identified by courseid). Students enroll in courses; each of the following situations concerns the Enrolls-In relationship set. For each situation, draw an ER diagram that describes it (assuming no further constraints hold). 1.Students can enroll in the same course in several semesters, and each offering must be recorded. 2. Students can enroll in the same course in several semesters, and only the most recent...
Consider the following database and answer the questions below. a) Write the SQL statement the displays the names of the students who have enrolled in the Database Systems course b) Write the SQL statement that displays a list of the students whose names start with 'S' c) Write the SQL statement that displays the Student ID, Student Name, Course ID, and Grade for students that passed at least one course with a grade better than B+ (i.e. A-, A, and...
2. Consider the following database and answer the questions below SPORT ENROLLMENT STUDENT COURSE ST ST TITLE 313 1313 50s0 Basketbal 8989 Basketbal 007 COMP203A 7007 COMP20e 007 ames Bond 302 Database Systems COMP203 Computer Or n Brown 00 CoMP302 A o0 3un SmuCOMP42daedDatabase Systems 3 13 COMP 209 70 5050 Susan Smith COMP447 nced Database S 1313 COMP2O3A 1313 COMP302 5050 COMP20 C 1313 COMP42 7007 Write the SQL statement that displays the names of the students who have...
DO NOT COPY AND PASTED!!!!!!!!!!!!! IF YOU DO NOT HOW TO DO IT, JUST DO NOT ANSWER MY QUESTIONS package scheduler; import java.util.List; public class Scheduler { /** * Instantiates a new, empty scheduler. */ public Scheduler() { } /** * Adds a course to the scheduler. * * @param course the course to be added */ public void addCourse(Course course) { } /** * Returns the list of courses that this scheduler knows about. * * This returned object...
package scheduler; import java.util.List; public class Scheduler { /** * Instantiates a new, empty scheduler. */ public Scheduler() { } /** * Adds a course to the scheduler. * * @param course the course to be added */ public void addCourse(Course course) { } /** * Returns the list of courses that this scheduler knows about. * * This returned object does not share state with the internal state of the Scheduler. * * @return the list of courses */...
Design a “good” entity-relationship diagramthat describes the following objects in an university application:students, instructors, professors, and courses.Students aresubdivided into graduate and undergraduate students. Students takea course in a particular semester and receive a grade for theirperformance. Sometimesstudents take the same course again in adifferent semester. There are no limits on how many courses astudent can take, and on how many students completed aparticularcourse. Each graduate student has exactly one advisor, who must bea professor, whereas each professor is allowed to...
Create sql queries to find the following
miscrosoft access compatible commands please
9. Courses for which at least three students earned a grade of A, showing the grade and the course code 10. Semesters when the highest number of courses have been scheduled, showing the semester name and the number of sections 11. (Extra) Professors that are not students, and students that are not professors, showing their ID and SSN 12. (Extra) Semesters for which all courses are taught by...
Someone please answer all of these. I need these badly. The
submission date is knocking at the door.
Experiment 1: SQL data definition and data insertion 46 hours) 1. CREATE TABLE. The database schema consists of the three relations, whose schemas are: S (Spa, Sname. Sgender, Sage, Sdert? // students(SID, name, gender, age, department) SC (Spa, Cne. Grade) //Course(SID, CID, grade) C (One Cname Crno. Ceredit) l/courses (CID, course name, prerequisite courses, credit) 2. DROP TABLE, ALTER TABLE, CREATE INDEX,...
How to complete this methods: import java.io.FileInputStream; import java.io.FileNotFoundException; import java.time.LocalDate; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Scanner; import java.util.Set; /** * Utility class that deals with all the other classes. * * @author EECS2030 Summer 2019 * */ public final class Registrar { public static final String COURSES_FILE = "Courses.csv"; public static final String STUDENTS_FILE = "Students.csv"; public static final String PATH = System.getProperty("java.class.path"); /** * Hash table to store the list of students using their...