Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Below is the context: Suppose I have a relation Grades(student_id, assignment_id, score). I have 200 students and 20 assignments. I would grade all submissions of

Below is the context:

Suppose I have a relation Grades(student_id, assignment_id, score). I have 200 students and 20 assignments. I would grade all submissions of one assignment based on the submission order, and then insert the records. As a result, based on my insertion nature, the student_id is not sorted, but the assignment_id is. I choose heap file as my file organization. My page is quite small it can only store 40 records, or 200 bytes in one page. The SearchKeySize is 2 bytes and PointerSize is 2 bytes. My buffer size is also small, 4 pages.

Here are the problems I need help with:

If my most frequent query is to find all scores for an assignment, such as select score from grades where assignment_id=01; select score from grades where assignment_id=14;

A) What is the I/O cost if I dont build index for assignment_id? (note: assignment_id is sorted and each assignment_id can appear as many as 200 times in this relation)

B) Suppose I decide to build B+ tree index. What is the smallest number of pages do you estimate the B+ tree will take?

C) What is the best I/O cost for answering those queries with B+ tree index now?

D) Suppose at the end of the semester, I need to curve the grades. I decide to increase all scores by 5 points. What is the I/O cost for this operation?

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

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago