Add illustrative SQL queries for database updates

This brings in the changes from #41 and merges them into the appropriate
section.