Question: Consider the following relations: Dept (did (integer), dname (string), budget (double), managerid (integer)) Emp (eid (integer), ename (string), age (integer), salary (double)) Fields of types

Consider the following relations:

Dept (did (integer), dname (string), budget (double), managerid (integer))

Emp (eid (integer), ename (string), age (integer), salary (double))

Fields of types integer, double, and string occupy 4, 8, and 40 bytes, respectively. Each block can

t at most one tuple of an input relation. There are at most 22 blocks available to the join

algorithm in the main memory. Implement the optimized sort-merge join algorithm for

Dept ./Dept:managerid=Emp:eid Emp in C++.

Each input relation is stored in a separate CSV le, i.e., each tuple is in a separate line and

elds of each record are separated by commas.

The result of the join must be stored in a new CSV le. The les that store relations Dept

and Emp are Dept.csv and Emp.csv, respectively.

Your program must assume that the input les are in the current working directory, i.e., the

one from which your program is running.

The program must store the result in a new CSV le with the name join.csv in the current

working directory.

Your program must run on Linux.

Could any expert help on that!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!