This work aims to reduce queries on big data to computations on small data, and hence make querying big data possible under bounded resources. A query
Q is boundedly evaluable when posed on any big dataset
\cal D, there exists a fraction
\cal D_Q of
\cal D such that
Q(\cal D) = Q(\cal D_Q), and the cost of identifying
\cal D_Q is independent of the size of
\cal D. It has been shown that with an auxiliary structure known as access schema, many queries in relational algebra (RA) are boundedly evaluable under the set semantics of RA. This paper extends the theory of bounded evaluation to RA
aggr, i.e., RA extended with aggregation, under the bag semantics. (1) We extend access schema to bag access schema, to help us identify
\cal D_Q for RA
aggr queries
Q. (2) While it is undecidable to determine whether an RA
aggr query is boundedly evaluable under a bag access schema, we identify special cases that are decidable and practical. (3) In addition, we develop an effective syntax for bounded RA
aggr queries, i.e., a core subclass of boundedly evaluable RA
aggr queries without sacrificing their expressive power. (4) Based on the effective syntax, we provide efficient algorithms to check the bounded evaluability of RA
aggr queries and to generate query plans for bounded RA
aggr queries. (5) As proof of concept, we extend PostgreSQL to support bounded evaluation. We experimentally verify that the extended system improves performance by orders of magnitude.