Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please type in answers of Q3 part(a),(b),(c),(d),(e): Q3. The following questions are based on the database schema described below. The keys are underlined. Student(Name, StudentNumber,
Please type in answers of Q3 part(a),(b),(c),(d),(e):
Q3. The following questions are based on the database schema described below. The keys are underlined. Student(Name, StudentNumber, Class, Major) Course(CourseName, CourseNumber, CreditHours, Department) PrerequisiteCourseNumber. PrerequisiteNumber) Section SectionIdentifier, CourseNumber, Semester, Year, Instructor) Grade_Report(StudentNumber. Sectionldentifier, Grade) (a) Write the following query in SQL: Retrieve the student number, name and major ofall students who do not have a grade of D or F in any of their courses, and sort them by increasing order of student number. (b) Translate the query of part (a) into a query tree. (c) Pick a join from the query tree and discuss whether it is better to use Nested-Loops or Sort-Merge join algorithm to evaluate it. Give reasons for your choice. (d) If you were allowed to create one index, which one would it be to improve the performance of the join in part (c). Explain. (e) Describe the advantages and disadvantages of having an index on Student Number towards processing this query. Q3. The following questions are based on the database schema described below. The keys are underlined. Student(Name, StudentNumber, Class, Major) Course(CourseName, CourseNumber, CreditHours, Department) PrerequisiteCourseNumber. PrerequisiteNumber) Section SectionIdentifier, CourseNumber, Semester, Year, Instructor) Grade_Report(StudentNumber. Sectionldentifier, Grade) (a) Write the following query in SQL: Retrieve the student number, name and major ofall students who do not have a grade of D or F in any of their courses, and sort them by increasing order of student number. (b) Translate the query of part (a) into a query tree. (c) Pick a join from the query tree and discuss whether it is better to use Nested-Loops or Sort-Merge join algorithm to evaluate it. Give reasons for your choice. (d) If you were allowed to create one index, which one would it be to improve the performance of the join in part (c). Explain. (e) Describe the advantages and disadvantages of having an index on Student Number towards processing this query
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started