\[Learned Containment Rates\]-\[Containment Evaluation\] we describe and evaluate the CRN model for solving this problem. In Sections \[Cardinality Estimation Using Containment Rates\]-\[Cardinality Evaluation\] we describe and evaluate our new approach for estimating cardinalities using containment rates. In Section \[Improving Existing Cardinality Estimation Models\] we show how one can adapt the new ideas to improve existing cardinality estimation models. Sections \[Related work\]-\[Conclusion\] present related work, conclusions and future work.

Containment Rate Definition {#Containment Rate Definition}
===========================

We define the containment rate between two queries $Q1$, and $Q2$ on a *specific* database $D$. *Query $Q1$ is $x\%$-contained in query $Q2$ on database $D$ if precisely $x\%$ of $Q1$’s execution result rows on database $D$ are also in $Q2$’s execution result on database $D$.* The containment rate is formally a function from **QxQxD** to **R**, where **Q** is the set of all queries, **D** of all databases, and **R** the Real numbers. This function can be directly calculated using the cardinality of the results of queries $Q1$ and $Q2$ as follows: $$x\% = \frac{|Q1(D)\ {\mbox{$\cap$}}\ Q2(D)|}{|Q1(D)|} * 100$$ Where, $Q(D)$ denotes $Q$’s execution result on database $D$. (in case $Q1$’s execution result is empty, then $Q1$ is 0%-contained in $Q2$). Note that the 