Database Query Tree plan cost and cardinality

Consider the following tables:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

students (studentsId -> name, course, dateBirth)

books (bookid -> title, yearPublication, publishingCompany)

loans (loanId -> studentId, bookId, dateLoan)

And the following query:SELECT S.name

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

FROM Students S, books B, loans L

WHERE S.studentId = L.studentId

AND B.bookId = L.bookId

AND B.publishingCompany = ‘O’Reilly’

AND YEAR(S.dateBirth) BETWEEN 1990 AND 2000

And assume:• There are 15,000 student records stored on 1,500 pages.

There are 100,000 work records stored on 10,000 pages. There are 500,000 loan records stored on 25,000 pages. There are 1,000 different publishers. Students’ birth dates range from 1980 to 2010

A) Draw the query plan tree, assuming there are no indexes and the data is not ordered by any attributes. Justify and give an example of your answer?

B) Calculate the cost of this query plan (i) and the cardinality of the result (ii). Justify and exemplify your answer.

Still stressed with your coursework?
Get quality coursework help from an expert!