1. A method for automatic and dynamic adaptation of cache groups in a database system having one or more processors, the method comprising: creating an anchored table set configured to hold one or more cache tables; collecting value-based predicates in a database query; creating a cache table for each value-based predicate and marking a filling column in each respective cache table; adding each cache table to the anchored table set; determining addable referential cache constraints between each cache table in the anchored table set; determining costs for each addable referential cache constraint; adding the referential cache constraint based on the determined cost of the respective referential cache constraint; checking the cache tables in the anchored table set for heterogeneous cycles between tables; and modifying referential cache constraints between cache tables when a heterogeneous cycle exists between cache tables, wherein the determining of addable referential cache constraints, the determining of costs for each addable referential cache constraint, the adding of the referential cache constraint, the checking of the cache tables in the anchored table set, and the modifying of the referential cache constraints is repeated until all possible addable referential cache constraints have been exhausted, and cache groups can be federated when the cache groups belong to a same predicate pattern and the cache groups can be prohibited from further federation when the cache groups belong to a different predicate pattern.