在关系SC(student_id,student_name,course_id,grade)中,有 student_id,course_id→grade student_id→student_name 关系SC最高达到______范式。
A.不满足
B.1NF
C.2NF
D.3NF
第1题:
在“学生—选课—课程”数据库中的两个关系如下:
S(SNO,SNAME,SEX,AGE)
SC(SNO,CNO,GRADE)
则与SQL命令SELECT s.sname,sC.grade FROM s, sc WHERE s.sno=s sC.sno等价的关系代数表达式是【 】。
第2题:
A. ALTER TABLE students ADD PRIMARY KEY _ id;
B. ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
C. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
D. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
E. ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
第3题:
The STUDENT_GRADES table has these columns:The register has requested a report listing the students‘ grade point averages (GPA), sorted from highest grade point average to lowest within each semester, starting from the earliest date. Which statement accomplishes this?()
A. SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester_end DESC, gpa DESC;
B. SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester_end ASC, gpa ASC;
C. SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester_end, gpa DESC;
D. SELECT student_id, semester_end, gpa FROM student_grades ORDER BY gpa DESC, semester_end DESC;
E. SELECT student_id, semester_end, gpa FROM student_grades ORDER BY gpa DESC, semester_end ASC;
第4题:
在关系SC中,查询学习课程号为'OB',且成绩在60至90之间的学生学号的正确的 SQL命令是
A.SELECT SNO FROMSC WHERE CNO='DB' AND GRADE BETWEEN 60 AND 90
B.SELECT SNO FROM SC WHERE CNO='DB' OR GRADE BETWEEN 60 AND 90
C.SELECT SNO FROM SC WHERE CNO='DB' AND GRADE>=60 AND 90
D.SELECTSNO FROM SCWHERECNO='DB' AND GRADE<=60 AND GRADE>=90
第5题:
若要使所有学科80分以上的成绩都增加5%, 80至60分的成绩都增加10%,应如何更新数据库( )。 A.UPDATE SC SET GRADE=GRADE*1.05 WHERE SC.GRADE>=80 UPDATE SC SET GRADE=GRADE* 1.10 WHERE SC.GRADE>=60 AND SC.GRADE <=80 B.UPDATE SC SET GRADE=GRADE* 1.10 WHERE SC.GRADE>=60 AND SC.GRADE<=80 UPDATE SC SET GRADE=GRADE* 1.05 WHERE SC.GRADE>=80 C.UPDATE SC SET GRADE=GRADE* 1.05 WIRE SC.GRADE>=80 AND SET GRADE =GRADE* 1.10 WHARE SC.GRADE>=60 D.UPDATE SC SET GRADE=GRADE* 1.10 WHERE SC.GRADE>=60 AND SC.GRADE <=80 AND SET GRADE=GRADE* 1.05 WHERE SC.GRADE>=80
第6题:
把对关系SC的属性GRADE的修改权授予用户ZHAO的SQL语句是 ()
第7题:
The STUDENT_GRADES table has these columns: STUDENT_ID NUMBER(12) SEMESTER_END DATE GPA NUMBER(4,3) The register has requested a report listing the students' grade point averages (GPA), sorted from highest grade point average to lowest within each semester, starting from the earliest date. Which statement accomplishes this?()
第8题:
SELECT student_ id, marks, ROWNUM Rank FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99 AND course_id = 'INT_SQL' ORDER BY mark DESC;
SELECT student_id, marks, ROWID Rank FROM students WHERE ROWID <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY mark;
SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC- 99' AND course_id = 'INT_SQL' ORDER BY mark DESC;
SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE (finish_date BETWEEN '01-JAN-99 AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC) WHERE ROWNUM <= 10;
SELECT student id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students ORDER BY marks) WHERE ROWNUM <= 10 AND finish date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course _ id 'INT_SQL';
第9题:
ALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students (student_id);
ALTER TABLE student_grades ADD CONSTRAINT NAME = student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
ALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
ALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
ALTER TABLE student grades ADD NAME student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
第10题:
ALTER TABLE students ADD PRIMARY KEY _ id;
ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
第11题:
SELECT student_id, gpa FROM student_grades ORDER BY gpa ASC;
SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa ASC;
SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa;
SELECT student_id, gpa FROM student_grades ORDER BY gpa;
SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa DESC;
SELECT student_id, gpa FROM student_grades ORDER BY gpa DESC;
第12题:
ALTER TABLE students ADD PRIMARY KEY student_id;
ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
第13题:
The STUDENT_GRADES table has these columns:STUDENT_ID NUMBER(12)SEMESTER_END DATEGPA NUMBER(4,3)The registrar requested a report listing the students‘ grade point averages (GPA) sorted from highest grade point average to lowest.Which statement produces a report that displays the student ID and GPA in the sorted order requested by the registrar? ()
A. SELECT student_id, gpa FROM student_grades ORDER BY gpa ASC;
B. SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa ASC;
C. SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa;
D. SELECT student_id, gpa FROM student_grades ORDER BY gpa;
E. SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa DESC;
F. SELECT student_id, gpa FROM student_grades ORDER BY gpa DESC;
第14题:
A. ALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students (student_id);
B. ALTER TABLE student_grades ADD CONSTRAINT NAME = student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
C. ALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
D. ALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
E. ALTER TABLE student grades ADD NAME student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
第15题:
设有如下关系: SC(sno,cname,grade)(各属性含义分别为学生的学号、课程名称、成绩)现要将所 有学生的课程成绩增加10分,以下能正确地完成此操作的SQL命令是( )。
A.MODIFY sc SET grade+10
B.UPDATE sc SET grade+10
C.MODIFY sc SET grade=grade+10
D.UPDATE sc SET grade=grade+10
第16题:
在“学生—选课—课程”数据库中的两个关系如下:
s(sno,sname,sex,age)
sc(sno,cno,grade)
则关系代数表达式πs.sname,grade()等价的SQL命令是SELECT s.sname,sc.grade FROM s,sc WHERE______AND s.age>20
第17题:
在关系SC(student_id,student_name,course_id, grade)中,有student_id,course_id→ gradesmdent_id→student_name关系SC最高达到( )范式。
A.不满足
B.1NF
C.2NF
D.3NF
第18题:
You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()
第19题:
SELECT student_ id, marks, ROWNUM Rank FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99 AND course_id = 'INT_SQL' ORDER BY mark DESC;
SELECT student_id, marks, ROWID Rank FROM students WHERE ROWID <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY mark;
SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC- 99' AND course_id = 'INT_SQL' ORDER BY mark DESC;
SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE (finish_date BETWEEN '01-JAN-99 AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC) WHERE ROWNUM <= 10;
SELECT student id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students ORDER BY marks) WHERE ROWNUM <= 10 AND finish date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course _ id 'INT_SQL';
第20题:
SELECT student_ id, marks, ROWNUM Rank FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC;
SELECT student_id, marks, ROWID Rank FROM students WHERE ROWID <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks;
SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC);
SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students ORDER BY marks DESC) WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course _ id ='INT _ SQL';
第21题:
SELECT student_id, gpa FROM student_grades WHERE semester_end BETWEEN '01-JAN-2001' AND '31-DEC-2001' OR gpa > 3.;
SELECT student_id, gpa FROM student_grades WHERE semester_end BETWEEN '01-JAN-2001' AND '31-DEC-2001' AND gpa gt 3.0;
SELECT student_id, gpa FROM student_grades WHERE semester_end BETWEEN '01-JAN-2001' AND '31-DEC-2001' AND gpa > 3.0;
SELECT student_id, gpa FROM student_grades WHERE semester_end > '01-JAN-2001' OR semester_end < '31-DEC-2001' AND gpa >=s 3.0;
第22题:
SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester_end DESC, gpa DESC;
SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester _end, ASC,gpa ASC;
SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester _end, gpa DESC;
SELECT student_id, semester_end, gpa FROM student_grades ORDER BY gpa DESC,semester_end DESC;
SELECT student_id, semester_end, gpa FROM student_grades
第23题:
CREATE TABLE student_grades (student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk REFERENCES (student_id) FOREIGN KEY student (student_id));
CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));
CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT FOREIGN KEY (student_id) REFERENCES student (student_id));
CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));