Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

DATABASE Given the following samples of larger tables, give the queries for the

ID: 3848927 • Letter: D

Question

DATABASE

Given the following samples of larger tables, give the queries for the problems below STUDENT Name StudentID Class Major CS Brown Class is 1 for Freshman, 2 for Sophomore, 3 for Junior and 4 for Seniors COURSE Credit hours CourselD Name Department CS101 intro. to Computer Science CS191 Discrete Struct I 3 CS282 Assembly Language 4 OBOE 101 OBOA Freshman Oboe SECTION SectionID Course ID Semester Year Faculty ID 2014 OBOE 101 BBishop 781 CS101 541 2014 KBingham 2014 552 CS101 BHare CS101 2014 BHare 448 662 CS191 FS 2014 XLiu

Explanation / Answer

(1) CREATE TABLE STUDENT(StudentID INT NOT NULL PRIMARY KEY),

(2) CREATE TABLE COURSE (courseID INT NOT NULL PRIMARY KEY),

(3)CREATE TABLE PREREQUISITE (courseID INT,Foreign Key(COURSE.courseID) ,prerequisite_courseID VARCHAR (30) Foreign Key COURSE.CourseID REFERENCES CourseID,prerequisite_CourseID);

(4) Select Name,StudentID from STUDENT, COURSE where Department ='cs';