normalized-outer-joins.svg 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  3. "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  4. <!-- Generated by graphviz version 2.43.0 (0)
  5. -->
  6. <!-- Title: G Pages: 1 -->
  7. <svg width="822pt" height="670pt"
  8. viewBox="0.00 0.00 822.00 669.99" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  9. <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 665.99)">
  10. <title>G</title>
  11. <polygon fill="white" stroke="transparent" points="-4,4 -4,-665.99 818,-665.99 818,4 -4,4"/>
  12. <text text-anchor="middle" x="372" y="-7.8" font-family="Times,serif" font-size="14.00">select * from t1 left join t3 on t1.f1 = t3.f1 left join t2 on t1.f1 = t2.f1; (with normalized outer joins)</text>
  13. <g id="clust1" class="cluster">
  14. <title>cluster0</title>
  15. <polygon fill="none" stroke="black" points="245,-383.99 245,-653.99 683,-653.99 683,-383.99 245,-383.99"/>
  16. <text text-anchor="middle" x="295.5" y="-638.79" font-family="Times,serif" font-size="14.00">Box0:Select</text>
  17. </g>
  18. <g id="clust3" class="cluster">
  19. <title>cluster1</title>
  20. <polygon fill="none" stroke="black" points="8,-182 8,-350.99 318,-350.99 318,-182 8,-182"/>
  21. <text text-anchor="middle" x="70.5" y="-335.79" font-family="Times,serif" font-size="14.00">Box1:OuterJoin</text>
  22. </g>
  23. <g id="clust5" class="cluster">
  24. <title>cluster5</title>
  25. <polygon fill="none" stroke="black" points="164,-31 164,-163 326,-163 326,-31 164,-31"/>
  26. <text text-anchor="middle" x="240" y="-147.8" font-family="Times,serif" font-size="14.00">Box5:BaseTable T2</text>
  27. </g>
  28. <g id="clust7" class="cluster">
  29. <title>cluster2</title>
  30. <polygon fill="none" stroke="black" points="326,-182 326,-350.99 636,-350.99 636,-182 326,-182"/>
  31. <text text-anchor="middle" x="388.5" y="-335.79" font-family="Times,serif" font-size="14.00">Box2:OuterJoin</text>
  32. </g>
  33. <g id="clust9" class="cluster">
  34. <title>cluster4</title>
  35. <polygon fill="none" stroke="black" points="482,-31 482,-163 644,-163 644,-31 482,-31"/>
  36. <text text-anchor="middle" x="558" y="-147.8" font-family="Times,serif" font-size="14.00">Box4:BaseTable T3</text>
  37. </g>
  38. <g id="clust11" class="cluster">
  39. <title>cluster3</title>
  40. <polygon fill="none" stroke="black" points="644,-200.49 644,-332.49 806,-332.49 806,-200.49 644,-200.49"/>
  41. <text text-anchor="middle" x="720" y="-317.29" font-family="Times,serif" font-size="14.00">Box3:BaseTable T1</text>
  42. </g>
  43. <!-- boxhead0 -->
  44. <g id="node1" class="node">
  45. <title>boxhead0</title>
  46. <polygon fill="none" stroke="black" points="529,-392.49 529,-622.49 675,-622.49 675,-392.49 529,-392.49"/>
  47. <text text-anchor="middle" x="602" y="-607.29" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  48. <polyline fill="none" stroke="black" points="529,-599.49 675,-599.49 "/>
  49. <text text-anchor="middle" x="602" y="-584.29" font-family="Times,serif" font-size="14.00">0: Q4.c0 as F1</text>
  50. <polyline fill="none" stroke="black" points="529,-576.49 675,-576.49 "/>
  51. <text text-anchor="middle" x="602" y="-561.29" font-family="Times,serif" font-size="14.00">1: Q4.c1 as F2</text>
  52. <polyline fill="none" stroke="black" points="529,-553.49 675,-553.49 "/>
  53. <text text-anchor="middle" x="602" y="-538.29" font-family="Times,serif" font-size="14.00">2: Q4.c2 as F3</text>
  54. <polyline fill="none" stroke="black" points="529,-530.49 675,-530.49 "/>
  55. <text text-anchor="middle" x="602" y="-515.29" font-family="Times,serif" font-size="14.00">3: Q0.c0 as F1</text>
  56. <polyline fill="none" stroke="black" points="529,-507.49 675,-507.49 "/>
  57. <text text-anchor="middle" x="602" y="-492.29" font-family="Times,serif" font-size="14.00">4: Q0.c1 as F2</text>
  58. <polyline fill="none" stroke="black" points="529,-484.49 675,-484.49 "/>
  59. <text text-anchor="middle" x="602" y="-469.29" font-family="Times,serif" font-size="14.00">5: Q0.c2 as F3</text>
  60. <polyline fill="none" stroke="black" points="529,-461.49 675,-461.49 "/>
  61. <text text-anchor="middle" x="602" y="-446.29" font-family="Times,serif" font-size="14.00">6: Q2.c0 as F1</text>
  62. <polyline fill="none" stroke="black" points="529,-438.49 675,-438.49 "/>
  63. <text text-anchor="middle" x="602" y="-423.29" font-family="Times,serif" font-size="14.00">7: Q2.c1 as F2</text>
  64. <polyline fill="none" stroke="black" points="529,-415.49 675,-415.49 "/>
  65. <text text-anchor="middle" x="602" y="-400.29" font-family="Times,serif" font-size="14.00">8: Q2.c2 as F3</text>
  66. </g>
  67. <!-- Q0 -->
  68. <g id="node2" class="node">
  69. <title>Q0</title>
  70. <ellipse fill="none" stroke="black" cx="290" cy="-507.49" rx="37.09" ry="37.09"/>
  71. <text text-anchor="middle" x="290" y="-503.79" font-family="Times,serif" font-size="14.00">Q0(F)</text>
  72. </g>
  73. <!-- boxhead1 -->
  74. <g id="node5" class="node">
  75. <title>boxhead1</title>
  76. <polygon fill="none" stroke="black" points="16,-208.99 16,-300.99 162,-300.99 162,-208.99 16,-208.99"/>
  77. <text text-anchor="middle" x="89" y="-285.79" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  78. <polyline fill="none" stroke="black" points="16,-277.99 162,-277.99 "/>
  79. <text text-anchor="middle" x="89" y="-262.79" font-family="Times,serif" font-size="14.00">0: Q3.c0 as F1</text>
  80. <polyline fill="none" stroke="black" points="16,-254.99 162,-254.99 "/>
  81. <text text-anchor="middle" x="89" y="-239.79" font-family="Times,serif" font-size="14.00">1: Q3.c1 as F2</text>
  82. <polyline fill="none" stroke="black" points="16,-231.99 162,-231.99 "/>
  83. <text text-anchor="middle" x="89" y="-216.79" font-family="Times,serif" font-size="14.00">3: Q3.c2 as F3</text>
  84. </g>
  85. <!-- Q0&#45;&gt;boxhead1 -->
  86. <g id="edge6" class="edge">
  87. <title>Q0&#45;&gt;boxhead1</title>
  88. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M266.94,-477.75C242.17,-446.88 201.45,-396.14 165.22,-350.98"/>
  89. </g>
  90. <!-- Q2 -->
  91. <g id="node3" class="node">
  92. <title>Q2</title>
  93. <ellipse fill="none" stroke="black" cx="382" cy="-507.49" rx="37.09" ry="37.09"/>
  94. <text text-anchor="middle" x="382" y="-503.79" font-family="Times,serif" font-size="14.00">Q2(F)</text>
  95. </g>
  96. <!-- boxhead2 -->
  97. <g id="node8" class="node">
  98. <title>boxhead2</title>
  99. <polygon fill="none" stroke="black" points="334,-208.99 334,-300.99 480,-300.99 480,-208.99 334,-208.99"/>
  100. <text text-anchor="middle" x="407" y="-285.79" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  101. <polyline fill="none" stroke="black" points="334,-277.99 480,-277.99 "/>
  102. <text text-anchor="middle" x="407" y="-262.79" font-family="Times,serif" font-size="14.00">0: Q1.c0 as F1</text>
  103. <polyline fill="none" stroke="black" points="334,-254.99 480,-254.99 "/>
  104. <text text-anchor="middle" x="407" y="-239.79" font-family="Times,serif" font-size="14.00">1: Q1.c1 as F2</text>
  105. <polyline fill="none" stroke="black" points="334,-231.99 480,-231.99 "/>
  106. <text text-anchor="middle" x="407" y="-216.79" font-family="Times,serif" font-size="14.00">2: Q1.c2 as F3</text>
  107. </g>
  108. <!-- Q2&#45;&gt;boxhead2 -->
  109. <g id="edge7" class="edge">
  110. <title>Q2&#45;&gt;boxhead2</title>
  111. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M385.31,-470.41C388.07,-440.54 392.17,-396.99 396,-358.99 396.27,-356.35 396.54,-353.68 396.81,-350.98"/>
  112. </g>
  113. <!-- Q4 -->
  114. <g id="node4" class="node">
  115. <title>Q4</title>
  116. <ellipse fill="none" stroke="black" cx="474" cy="-507.49" rx="37.09" ry="37.09"/>
  117. <text text-anchor="middle" x="474" y="-503.79" font-family="Times,serif" font-size="14.00">Q4(F)</text>
  118. </g>
  119. <!-- Q3 -->
  120. <g id="node6" class="node">
  121. <title>Q3</title>
  122. <ellipse fill="none" stroke="black" cx="245" cy="-254.99" rx="64.99" ry="64.99"/>
  123. <text text-anchor="middle" x="245" y="-251.29" font-family="Times,serif" font-size="14.00">Q3(F) as T2</text>
  124. </g>
  125. <!-- Q4&#45;&gt;Q3 -->
  126. <g id="edge1" class="edge">
  127. <title>Q4&#45;&gt;Q3</title>
  128. <path fill="none" stroke="black" d="M469.18,-470.69C463.69,-443.4 452.12,-406.76 428,-383.99 410.06,-367.05 342.42,-364.83 322,-350.99 306.01,-340.15 291.66,-325.01 279.8,-310"/>
  129. <text text-anchor="middle" x="469.5" y="-362.79" font-family="Times,serif" font-size="14.00">(Q4.c0) = (Q3.c0)</text>
  130. </g>
  131. <!-- Q1 -->
  132. <g id="node9" class="node">
  133. <title>Q1</title>
  134. <ellipse fill="none" stroke="black" cx="563" cy="-254.99" rx="64.99" ry="64.99"/>
  135. <text text-anchor="middle" x="563" y="-251.29" font-family="Times,serif" font-size="14.00">Q1(F) as T3</text>
  136. </g>
  137. <!-- Q4&#45;&gt;Q1 -->
  138. <g id="edge2" class="edge">
  139. <title>Q4&#45;&gt;Q1</title>
  140. <path fill="none" stroke="black" d="M479.94,-470.78C486,-444.08 497.8,-408.17 520,-383.99 526.99,-376.37 534.7,-382.18 541,-373.99 552.75,-358.71 558.88,-339.06 561.92,-320.21"/>
  141. <text text-anchor="middle" x="611.5" y="-362.79" font-family="Times,serif" font-size="14.00">(Q4.c0) = (Q1.c0)</text>
  142. </g>
  143. <!-- boxhead3 -->
  144. <g id="node11" class="node">
  145. <title>boxhead3</title>
  146. <polygon fill="none" stroke="black" points="652,-208.99 652,-300.99 798,-300.99 798,-208.99 652,-208.99"/>
  147. <text text-anchor="middle" x="725" y="-285.79" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  148. <polyline fill="none" stroke="black" points="652,-277.99 798,-277.99 "/>
  149. <text text-anchor="middle" x="725" y="-262.79" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  150. <polyline fill="none" stroke="black" points="652,-254.99 798,-254.99 "/>
  151. <text text-anchor="middle" x="725" y="-239.79" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  152. <polyline fill="none" stroke="black" points="652,-231.99 798,-231.99 "/>
  153. <text text-anchor="middle" x="725" y="-216.79" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  154. </g>
  155. <!-- Q4&#45;&gt;boxhead3 -->
  156. <g id="edge4" class="edge">
  157. <title>Q4&#45;&gt;boxhead3</title>
  158. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M477.18,-470.45C481.75,-442.07 492.89,-404.06 520,-383.99 548.27,-363.05 649.52,-394.64 678,-373.99 692.12,-363.75 702,-348.57 708.91,-332.49"/>
  159. </g>
  160. <!-- boxhead5 -->
  161. <g id="node7" class="node">
  162. <title>boxhead5</title>
  163. <polygon fill="none" stroke="black" points="172,-39.5 172,-131.5 318,-131.5 318,-39.5 172,-39.5"/>
  164. <text text-anchor="middle" x="245" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  165. <polyline fill="none" stroke="black" points="172,-108.5 318,-108.5 "/>
  166. <text text-anchor="middle" x="245" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  167. <polyline fill="none" stroke="black" points="172,-85.5 318,-85.5 "/>
  168. <text text-anchor="middle" x="245" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  169. <polyline fill="none" stroke="black" points="172,-62.5 318,-62.5 "/>
  170. <text text-anchor="middle" x="245" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  171. </g>
  172. <!-- Q3&#45;&gt;boxhead5 -->
  173. <g id="edge3" class="edge">
  174. <title>Q3&#45;&gt;boxhead5</title>
  175. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M245,-189.72C245,-180.97 245,-171.93 245,-163"/>
  176. </g>
  177. <!-- boxhead4 -->
  178. <g id="node10" class="node">
  179. <title>boxhead4</title>
  180. <polygon fill="none" stroke="black" points="490,-39.5 490,-131.5 636,-131.5 636,-39.5 490,-39.5"/>
  181. <text text-anchor="middle" x="563" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  182. <polyline fill="none" stroke="black" points="490,-108.5 636,-108.5 "/>
  183. <text text-anchor="middle" x="563" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  184. <polyline fill="none" stroke="black" points="490,-85.5 636,-85.5 "/>
  185. <text text-anchor="middle" x="563" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  186. <polyline fill="none" stroke="black" points="490,-62.5 636,-62.5 "/>
  187. <text text-anchor="middle" x="563" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  188. </g>
  189. <!-- Q1&#45;&gt;boxhead4 -->
  190. <g id="edge5" class="edge">
  191. <title>Q1&#45;&gt;boxhead4</title>
  192. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M563,-189.72C563,-180.97 563,-171.93 563,-163"/>
  193. </g>
  194. </g>
  195. </svg>