Question2
Consider the following relational schema as part of a university database:
Prof(sin, pname, o_ce, age, sex, specialty, dept did)
Dept(did, dname, budget, num_majors, chair_sin)
Assume the following queries are the most common queries in the
workload for this university and they are almost equivalent in
frequency and importance:
Assume that both B+ trees and hashed indexes are supported by the
DBMS and that both single- and multiple-attribute index search keys
are permitted.
Specify the attributes you recommend indexing on, indicating
whether each index should be clustered or unclustered and whether
it should be a B+ tree or a hashed index.
Note: If you can search with an index-only plan you should create a
composite search key.
a. Find the maximum age of professors in each department.
b. Find the name of professors who have a user-specified research specialty.
c. List names of the departments with the budget more than 100K.
d. List the department id and chairperson for departments with a user-specified department name.
Answer:
a. Select Dept.dname, max(Prof.age) from Dept, Prof where Dept.did = Prof.dept_did group by Prof.dept_did;
b. Select pname from Prof where specialty = "user-specified research";
c. Select dname from Dept where budget > 100000;
d. Select Dept.did, Dept.dname, Prof.pname from Dept, Prof where Dept.chair_sin = Prof.sin;
Question2 Consider the following relational schema as part of a university database: Prof(sin, pname, o_ce, age, sex, specialty, dept did) Dept(did, dname, budget, num_majors, chair_sin) Assume the fo...
Intro to database systems question: Question2 (20 points, 5 points each) Consider the following relational schema as part of a university database Prof(sin, pname, o_ce, age, sex, specialty, dept did) Dept(did, dname, budget, num majors, chair sin) Assume the following queries are the most common queries in the workload for this university and they are almost equivalent in frequency and importance Assume that both B+ trees and hashed indexes are supported by the DBMS and that both single and multiple-attribute...
Consider the following relational schema as part of a university database: -age-sex-s-q339281 39 Prof(sin, pname, oce, age, sex, specialty, dept did) Dept(did, dname, budget, num majors, chair sin) ssume the following queries are the most common queries in the workload for this university and they are almost equivalent in frequency and importance ssume that both B+ trees and hashed indexes are supported by the DBMS and that both single- and multiple-attribute index search keys are permitted. Specify the attributes you...
You have been hired as database administrator for Athabasca University and the computing services director asked you to tune the following database that is too slow for query processing. The database has two relations: Professor(sin, prof_name, office_no, age, gender, specialty, dept_did) Department(did, dept_name, budget, nbr_programs, chair_sin) After examining the application you found that the following queries are the five most common queries in the workload for this university application and that all are roughly equivalent in frequency and importance: o...