Answered step by step
Verified Expert Solution
Link Copied!

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):

image text in transcribed

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions

Question

What is the purpose of a data communications standard?

Answered: 1 week ago

Question

state what is meant by the term performance management

Answered: 1 week ago