DATABASE - Answer 1-4 Answer 1-4 only Given the following samples of larger tabl
ID: 3861690 • Letter: D
Question
DATABASE - Answer 1-4
Answer 1-4 only
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 XLiuExplanation / Answer
1.
CREATE TABLE STUDENTS(
NAME VARCHAR (30) NOT NULL,
STUDENTID INT NOT NULL,
CLASS INT NOT NULL,
MAJOR VARCHAR (25) ,
PRIMARY KEY (STUDENTID)
);
2.
CREATE TABLE COURSE(
COURSEID VARCHAR2(10) NOT NULL,
NAME VARCHAR (30) NOT NULL,
Credit_hours INT NOT NULL,
DEPARTMENT CHAR (15) ,
PRIMARY KEY (COURSEID , NAME)
);
4.
SELECT NAME,STUDENTID FROM STUDENTS
WHERE MAJOR='CS';
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.