Please answer the following programing question Consider the

Please answer the following programing question.

Consider the following schema:Veterinarians (vid: integer, eLevel);

Examine (vid: integer,did: integer, fee: integer);

Dogs (did: integer, age: integer);

The eLevel is meant to be an experience rating level; it is in the range: [1, 10]. Fee is in the range: [25, 125], age is in the range: [8, 11]

Heap files corresponding to instances of the above relations are VFile (for Veterinarians), EFile (for Examine) and DFile (for Dogs); on each line of the heap file, the attributes are listed in the abovecorresponding schema order.

You are to write a C/C++ program to find the answer to the following query:

SELECT D.age, COUNT(*), AVG(X.fee), AVG(V.eLevel)                                                                                                                                           FROM Dogs D, Exmaine X,Veterinarians V                                                                                                                                   WHERE D.did=X.did AND X.vid=V.vid                                                                                                                                                                         GROUP BY D.age

You are expected to implement an efficient join algorithm as part of your solution to this problem.However, you must assume that main memory is limited, and it is not possible to read all of the relations into main memory at once; furthermore, your solution must be capable of processing files of unbounded (unknown) size. Your program is to use VFile, DFile and EFile as input to the program.

Solution

here is a simple five step preparation to collect and execute C/C++ software at the linux terminal. i have additionally included a sample C/C++ example to illustrate.

in order to write the program inside the terminal itself, we need a console (terminal) based totally text editor so, i am the usage of Vim on this tutorial considering that vim is the most popular console textual content editor, however you are unfastened to write your program in any editor like nano, p.c., jed or vim and so forth.

Now, shall we follow the instructions but it would be in reality useful if you learn a few vim basics right here (may not take plenty time) earlier than proceeding to the instructions or its perfectly okay in case you are in a hurry :)

Please answer the following programing question. Consider the following schema:Veterinarians (vid: integer, eLevel); Examine (vid: integer,did: integer, fee: in

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site