Build a simplified query processor that accesses data from the partitioned ratings table.
Budget: $10 – $30 USD
RangeQuery() -
-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). Each line of the file should represent a
tuple
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
-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). Each line of the file should represent a
tuple
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