Set operators Union Minus Intersect match ALL COLUMNS must have same ID, column names
Which is better? Filter with many conditions Union, Intersect, Minus of multiple filters Efficiency?
SQL Review select [columns] from table1, [table2] where condition1 and condition2 group by columns
SQL Review (select [columns] from table1, [table2] where condition1 and condition2 group by columns ) union (... ) alternate syntax for join
Practice queries Each creature who can swim but not gargle Each creature who can swim and float Each creature who has achieved two skills Do these in SQL or GRAPE (if possible)
Times Cartesian product of two sets this is what SQL does when you don't specify a join condition Times + Filter = Match Join GRAPE problems
Practice queries Each creature who can swim but not gargle Each creature with the number of skills it has achieved Do these in SQL and then GRAPE (if possible)
Query planner Use indices to satisfy filter conditions Hash joins Optimize join order B trees
Data constistency Atomicity Entire transactions complete or fail Consistency Foreign key constrains satisfied Isolation Transactions isolated from each other Durability As soon as a transaction is done, it's done start transaction / end transaction
Experiment with Postgres!