[prev] [index] [next]

Problem-solving in SQL

Developing SQL queries ...
  • relate required data to attributes in schema
  • identify which tables contain these attributes
  • combine data from relevant tables (FROM, join)
  • specify conditions to select relevant data (WHERE)
  • [optional] define grouping attributes (GROUP BY)
  • develop expressions to compute output values (SELECT)
Using views to represent intermediate results
  • is often helpful in expressing complex queries
  • has minimal query-execution-time cost