Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

=+b. Would you need to edit down the copy for a smaller-space ad?

Answered: 1 week ago

Question

=+4. About the medium.

Answered: 1 week ago