9. The method of claim 1 , wherein said automatically rewriting includes said performing said join-back algorithm, and wherein said performing said join-back algorithm further includes: ordering D 1 to D n in ascending selectivity order of Si, wherein said user query (Q) is of a form σ s R JC1 σ S1 D 1 . . . JCn σ Sn D n in which said user query Q is said σ s R and a relational table R joins each table D i using condition JCi; generating n+1 SQL queries said generating said n+1 SQL queries Q i including pushing from 0 to n semi-joins in an order specified by said ordering; compiling said n+1 SQL queries Q[i], said compiling including utilizing an optimizer of said DBMS; determining, by said DBMS, estimates of costs of computing resources required for an execution of each SQL query Q[i]; and selecting, as said rewritten query and subsequent to said determining, an SQL query Q j of said n+1 SQL queries Q[i], said SQL query Q j being associated with a least estimate of said determined estimates.
10. The method of claim 9 , wherein said generating said n+1 SQL queries Q[i] comprises: setting a counter to an initial value; and for said counter less than or equal to a terminal value, performing a loop that includes: if said counter is equal to said initial value, setting T to a first projection Π ckey (σ s R), otherwise setting T to a second projection Π ckey (σ s R JCi σ Si D 1 . . . JCi σ Si D i ), wherein said first projection and said second projection project input data of said first projection and said second projection, respectively, on ckey and remove duplicates therein, said ckey being a cluster key included in a definition of cleansing rule C, and wherein said setting T to said first projection and setting T to said second projection facilitate said pushing; generating Q[i] as an expression σ s′ (Φ c (σ ec (R) ckey (T))), wherein ec is an expanded condition and s′ is an optimized query condition, wherein said Φ c (σ ec (R) ckey (T)) is a result of applying said cleansing rule C on a data set σ ec (R), wherein said data set σ ec (R) is a result of directly pushing said expanded condition ec to said relational table R and cleansing data of said relational table R selected by said expanded condition ec, and wherein said generating includes: computing said expanded condition ec as s∥cc, wherein said s is a query condition on said relational table R and is included in said user query Q, and wherein said cc is a context condition defining a context set for a context reference X, said context reference X included in one or more context references included in a pattern of said cleansing rule C, and simplifying said query condition s to said optimized query condition s′, said simplifying including setting said optimized query condition s′ equal to s−cc; and incrementing said counter.