السلام عليكم و رحمة الله و بركاته
ارجو المساعده في هذه المساله
assume a relation student(name, age, GPA) is given that contains 200000 tuples. An
index on the age attribute (which is an integer field) has been ceated that takes 200
blocks of storage. the index is implemented using static hashing and you can assume that
there are no overflow pages. An alternative 2 B+ tree index on the GPA attribute(which
is a float field) has been ceated with 400 blocks of leaf pages (assume the B+ tree's
order is 100 with initial occupancy of 50%). An alternative 1 B+ tree index on the name
attribute (which is a string field) has been created with 4000 blocks of leaf pages (assume
the B+ tree's order is 100 with initial occupancy of 50%). How many block accesses does
the best implementation of the following queries take (you can either use the index if
helpful or not use the index)? give reasons for your answers
following queries:
a- Give the age of all the students that are named "John". Assume that there are 200
tuples with the name of John in the database.
b- Find all students of age 20 in the database. Assume that there are 200
students of the age in the database.
c- Find all students of age 30 in the database. Assume that there are 5000
students that have this age.
d- Find all students of GPA 3.0- 3.3 in the database. Assume that there are 2000
students that is at this age.
e- Find all students of GPA 3.0- 3.3 in the database. Assume that there are 100
students that have this age.
f- Compute the average age of the students in the database.
g- Compute the average GPA of the students in the database.