Compute the relevance (using appropriate definitions of term frequency and inverse document frequency) of each of the Practice Exercises in this chapter to the query “SQL relation”.
• Note that the two words in the query ‘SQL relation’ are ‘SQL’ and ‘relation’.
• Also, the practice exercise 2, 3, 4 and 5 do not contain either of the two words SQL or relation. So, their relevance is zero. The only practice exercise left to consider is 1PE.
• Assume that the alphanumeric characters or words also count in number of words in a practice exercise.
• Also, assume that the logs are of base 2.
• Now, The total numbers of words in the practice exercise 1 are .
• Both SQL and relation occur once in practice exercise 1.
• And the TF for ‘relation’ is also the same that is 0.043.
• In fact the IDF for ‘relation’ is also 1.