tut5a.pdf - CS5481 Data Engineering Tutorial 5 1 Suppose that a secondary B-tree index on building is available on relation department and that no other

tut5a.pdf - CS5481 Data Engineering Tutorial 5 1 Suppose...

This preview shows page 1 - 3 out of 3 pages.

CS5481 Data Engineering Tutorial 5 1. Suppose that a secondary B + -tree index on building is available on relation department , and that no other index is available. Discuss different ways to process the following selections. (a) ¬ ( building =“Watson”) ( department ) For this query, the index serves no purpose. We can scan the file sequentially and select all tuples whose building field is anything other than “Watson”. (b) ¬ ( building <“Watson”) ( department ) Use the index to locate the first tuple whose building field has value greater than or equal to “Watson”. From this tuple, follow the pointer chains till the end, retrieving all the tuples. (c) ¬ ( building < Watson budget <5000) ( department ) This query is equivalent to the query: building ≥”Watson” budget ≥5000 ( department ) Using the building index, we can retrieve all tuples with building value greater than or equal to “Watson” by following the pointer chains from the first “Watson” tuple. We also apply the additional criteria of budget 5000 on every tuple.
Image of page 1
CS5481 Data Engineering Tutorial 5 2. Suppose that an employee file has 10,000 records stored in 2,000 contiguous disk blocks and the following indices.
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 3 pages?

  • Fall '17
  • Victor Lee

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors