中文网站
  Advanced Search
Read the latest Blogs from IT professionals in the field. Read and write community created documents. Need IT help? Ask our staff. Connect with your peers. Check our Tech Shop for posters, books and software tools. Home

12.2.4 Database Systems: Other Operations

1. Some other equivalences for union and set difference:

∑P (r1 ∪ r2) = ∑P(r1) ∪P(r2)
∑P(r1 ∪r2)= ∑P(r1)-r2= ∑P(r1)-P(r2)
(r1 ∪r2) ∪r3 = r1 ∪(r2 ∪r3)
r1 ∪r2 = r2 ∪r1

2. Further Optimization

Our text covers only some of the possible operations. (For a more complete list, see Elmasri & Navathe, page 518.)

Also, it makes sense to combine the implementation of various sets of operations in order to reduce the size of intermediate relations:

  • Combine projects and selects with a Cartesian product or natural join.
  • The idea is to do the selection and/or projection while computing the join.
  • This saves computing a large intermediate relation that is going to be subsequently reduced by the select or project anyway.

Database System Structure: