GATE DA 2024 · Indexing (B-trees, B+ trees, Hash Indexing)

MSQ · 2 marks · Problem DBMS-DWH-0009

An OTT company is maintaining a large disk-based relational database of differe nt movies with the following schema: \(Movie(\underline{ID}, CustomerRating)\) \(Genre (\underline{ID}, Name)\)\(Movie\_Genre(\underline{MovieID}, \underline{GenreID})\)Consider the following SQL query on the relation database above:
SELECT *
FROM Movie, Genre, Movie_Genre
WHERE
Movie.CustomerRating > 3.4 AND Genre.Name = "Comedy" AND Movie_Genre.MovieID = Movie.ID AND Movie_Genre.GenreID = Genre.ID; This SQL query can be sped up using which of the following indexing options?
  1. A
    \({B}^{+}\)tree on all the attributes.
  2. B
    Hash index on Genre.Name and \({ B}^{+}\)tree on the remaining attributes.
  3. C
    Hash index on Movie.CustomerRating and \({B}^{+}\)tree on the remaining attributes.
  4. D
    Hash index on all the attributes.

Solve it on GATE DA practice →More Storage & Indexing problems

Show the worked solutionOfficial GATE Answer Key: A, B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/422917/gate-ds%26ai-2024-question-45

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com