Cheat sheets

DB-05Cheat sheet1 pageIn a paid pack

Relational Algebra: Operators

The basic operators (selection, projection, rename, union, difference, Cartesian product) and the derived ones (intersection, joins, division, assignment); union compatibility; result schema and the minimum and maximum number of tuples for each operator under set semantics; set versus bag semantics; the equivalence rules used to rewrite queries, with counterexamples for projection over difference and intersection; empty-relation edge cases and the "at least k" pattern with products only.

DB-06Cheat sheet1 pageIn a paid pack

Joins, Outer Joins and Division

Theta join, equi-join, natural join, semijoin, antijoin and the left, right and full outer joins, all evaluated on one small instance and checked in SQLite; join size bounds and the exact size when the join column is a key or a NOT NULL foreign key; division by its formula, by its "for all" meaning and in SQL, including the empty-divisor case where formulations disagree.