Implements the following relational OLAP query as PACT program:
SELECT r.pageURL, r.pageRank, r.avgDuration FROM Documents d JOIN Rankings r ON d.url = r.url WHERE CONTAINS(d.text, [keywords]) AND r.rank > [rank] AND NOT EXISTS ( SELECT * FROM Visits v WHERE v.destUrl = d.url AND v.visitDate < [date]); *
Table Schemas:
CREATE TABLE Documents ( url VARCHAR(100) PRIMARY KEY, contents TEXT ); CREATE TABLE Rankings ( pageRank INT, pageURL VARCHAR(100) PRIMARY KEY, avgDuration INT ); CREATE TABLE Visits ( sourceIP VARCHAR(16), destURL VARCHAR(100), visitDate DATE, adRevenue FLOAT, userAgent VARCHAR(64), countryCode VARCHAR(3), languageCode VARCHAR(6), searchWord VARCHAR(32), duration INT );