Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Task 1 : Relational Algebra ( 1 0 points ) Write relational algebra expressions for the following queries using the company database schema: Retrieve the
Task : Relational Algebra points
Write relational algebra expressions for the following queries using the company
database schema:
Retrieve the name and address of employees who work for the 'Research'
department. Do it by hand and insert screenshot
For every project located in 'Stafford', list the project number, the controlling
department number, and the department manager's last name, address, and birth
date. Do it by hand and insert screenshot
Task : Query Processing and Optimization points
Construct query trees for the following SQL queries:
Retrieve the name and address of employees who work for the 'Research'
department. Do it by hand and insert screenshot
For every project located in 'Stafford', list the project number, the controlling
department number, and the department manager's last name, address, and birth
date. Do it by hand and insert screenshot
For each query tree, identify the selection, projection, and join operations.
Given the following data distribution:
Employee table has records.
Department table has records.
Estimate the size of the output for the following query:FROM Employee E Department D
WHERE EDepartmentID DDepartmentID AND
DName
'Research';Discuss the different algorithms that can be used to implement selection operations in
query processing.
Task : Algorithms for External Sorting points
Explain the external merge sort algorithm and its importance in database systems.
A file of blocks is to be sorted with an available buffer space of blocks. How
many passes will be needed in the merge phase of the external sortmerge algorithm?
Task : Implementing the JOIN Operation points
Discuss the different main strategies for implementing the Join operation.
Compare their performance based on their time complexity, advantages and
disadvantages
Consider these relations with the following properties:
Assume that there are more than memory buffers available to facilitate this
operation, where each memory buffer can buffer one disk block
a Estimate the number of disk block accesses required for a natural join of and
using a nestedloop join if is used as the outer relation.
b Estimate the number of disk block accesses required for a natural join of r and s
using a nestedloop join if is used as the outer relation.
c Conclude
Task : Query Trees and Heuristics for Query Optimization points
Apply heuristic rules to optimize the query tree for the following query, show the
transformation of a nonoptimized query tree to an optimized query tree. Do it by hand
and insert screenshots of all the stepsFROM EMPLOYEE E WORKS ON W PROJECT P
WHERE PPname 'Aquarius' AND PPnumber WPno AND
ESsnWSsn AND EBdate ;Task : Query Execution Plans points
Using a MySQLXampp generate and interpret the query execution plan for the
following query, include screenshotsFROM Employee E Department D
WHERE EDepartmentID DDepartmentID AND
DName
'Research';
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started