JoinMethods Class Reference

#include <JoinMethods.h>

List of all members.


Detailed Description

Library of methods to handle joins between two heap files.

Author:
Dave Musicant, with considerable material reused from the UW-Madison Minibase project


Static Public Member Functions

static void tupleNestedLoop (string filename1, int numCols1, int colSizes1[], int joinCol1, string filename2, int numCols2, int colSizes2[], int joinCol2, string filenameOut, int numPagesOut, BufferManager *bufMgr)
 Joins two heap files using tuple nested loop algorithm, and places results in a new heapfile.
static void blockNestedLoop (string filename1, int numCols1, int colSizes1[], int joinCol1, string filename2, int numCols2, int colSizes2[], int joinCol2, string filenameOut, int numPagesOut, BufferManager *bufMgr)
 Joins two heap files using block nested loop algorithm, and places results in a new heapfile.


Member Function Documentation

static void JoinMethods::blockNestedLoop ( string  filename1,
int  numCols1,
int  colSizes1[],
int  joinCol1,
string  filename2,
int  numCols2,
int  colSizes2[],
int  joinCol2,
string  filenameOut,
int  numPagesOut,
BufferManager bufMgr 
) [static]

Joins two heap files using block nested loop algorithm, and places results in a new heapfile.

Each new record produced for the new heapfile is a concatenation of the two source records.

Parameters:
filename1 name of heap file containing relation 1.
numCols1 number of columns in relation 1.
colSizes1 array containing sizes of columns in relation 1.
joinCol1 join column of relation 1. Legitimate values of joinCol1 are in the range from 0 to (numCols1-1), inclusive.
filename2 name of heap file containing relation 2.
numCols2 number of columns in relation 2.
colSizes2 array containing sizes of columns in relation 2.
joinCol2 join column of relation 2. Legitimate values of joinCol2 are in the range from 0 to (numCols2-1), inclusive.
filenameOut name of output heap file to be created.
numPagesOut number of pages to be contained in new output heap file.
bufMgr reference to a buffer manager to contain pages in memory while working.
Exceptions:
IOException passed through from underlying file system.
JoinLengthsDifferentException if the lengths of the two join fields are not the same.

static void JoinMethods::tupleNestedLoop ( string  filename1,
int  numCols1,
int  colSizes1[],
int  joinCol1,
string  filename2,
int  numCols2,
int  colSizes2[],
int  joinCol2,
string  filenameOut,
int  numPagesOut,
BufferManager bufMgr 
) [static]

Joins two heap files using tuple nested loop algorithm, and places results in a new heapfile.

Each new record produced for the new heapfile is a concatenation of the two source records.

Parameters:
filename1 name of heap file containing relation 1.
numCols1 number of columns in relation 1.
colSizes1 array containing sizes of columns in relation 1.
joinCol1 join column of relation 1. Legitimate values of joinCol1 are in the range from 0 to (numCols1-1), inclusive.
filename2 name of heap file containing relation 2.
numCols2 number of columns in relation 2.
colSizes2 array containing sizes of columns in relation 2.
joinCol2 join column of relation 2. Legitimate values of joinCol2 are in the range from 0 to (numCols2-1), inclusive.
filenameOut name of output heap file to be created.
numPagesOut number of pages to be contained in new output heap file.
bufMgr pointer to a buffer manager to contain pages in memory while working.
Exceptions:
JoinLengthsDifferentException if the lengths of the two join fields are not the same.


Generated on Thu Aug 30 08:39:22 2007 for Minibase by  doxygen 1.4.7