Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume we have the following information about a University database: All tables are stored in packed form in blocks of length 4096 bytes. Student has

Assume we have the following information about a University database:

All tables are stored in packed form in blocks of length 4096 bytes.

Student has 10,000 tuples, each 200 bytes long. It is hashed on stuId, the primary key, and has a secondary non-clustered index on lastName, with three levels. There are 8000 values for lastName, 2000 values for firstName, 25 values for major, and 150 values for credit.

Faculty has 800 tuples of length 100 bytes. It has an index on facId, the primary key, with two levels. There is a secondary non-clustered index on department, with one level. facName has 650 values, department has 25 values, and rank has 4 values.

Class has 2500 tuples with length of 100 bytes. It is hashed on classNumber, the primary key, and has no secondary indexes. facId has 700 values here, schedule has 35 values, and room has 350 values.

Enroll has 50,000 tuples with length of 100 bytes. It has a composite index on the primary key, {classNumber, stuId}, with four levels, and it has no other index. The attribute grade has 10 values.

1) Find the read cost only (no writing costs) of Class |x| Enroll using nested loops with:

- Class as the outside loop and buffer size of only two blocks

- Enroll as the outside loop and buffers size of two blocks

- Class as the outside loop and buffer size of 10 blocks

- Enroll as the outside loop and buffer size of 10 blocks

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 Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

Complete the table.

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago