Query Processing

Job ID: 32106188

Budget: $10 – $30 USD

Implement a Python function RangeQuery that takes as input: (1) Ratings table stored in
PostgreSQL, (2) RatingMinValue, (3) RatingMaxValue, and (4) openconnection
○ Please note that the RangeQuery would not use ratings table but it would use the
range and round robin partitions of the ratings table.
RangeQuery() then returns all tuples for which the rating value is larger than or equal to
RatingMinValue and less than or equal to RatingMaxValue.
The returned tuples should be stored in a text file, named RangeQueryOut.txt (in the
same directory where Interface.py is present)
PointQuery() -
Implement a Python function PointQuery that takes as input: (1) Ratings table stored in
PostgreSQL, (2) RatingValue, and (3) openconnection
○ Please note that the PointQuery would not use ratings table but it would use the
range and round robin partitions of the ratings table.
PointQuery() then returns all tuples for which the rating value is equal to RatingValue.
RatingValue
The returned tuples should be stored in a text file, named PointQueryOut.txt (in the same
directory where Interface.py is present) such that each line represents a tuple that has
the following format such that PartitionName represents the full name of the partition
Related categories: Python PostgreSQL